PGUSER Env Variable used for Role creation but not used for DB access
Opened this issue · 1 comments
It seems that if I run my tests with a default configuration and have the environment variable PGUSER
unset, everything goes well.
However, if I have PGUSER
set to postgres, for instance, I get a ConnectionTimedOut
error.
By inspecting with netstat
and manually connecting with psql
while I wait for the timeout, it seems that the postgres
user hasn't been created but is used by tmp-postgres when it tries to connect. Instead, my current user (mzabani
in my case) is able to connect to the postgres DB but is not used by tmp-postgres when it tries to connect.
I'm not sure if this is actually a bug since I just started using tmp-postgres, so sorry if this is noise, and thanks for the library!
I think this is a bug.
The code that calls initdb
uses the PGUSER
environment for role creation but I don't think I use it for the connections parameters. I need process that is consistent so I should probably support the PGUSER
in both cases.