Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PGUSER Env Variable used for Role creation but not used for DB access #258

Open
mzabani opened this issue Jun 6, 2020 · 1 comment
Open
Labels

Comments

@mzabani
Copy link

mzabani commented Jun 6, 2020

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!

@jfischoff
Copy link
Owner

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.

@jfischoff jfischoff added the bug label Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants