-
Notifications
You must be signed in to change notification settings - Fork 845
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
fix name, location of pgpass file #58
Comments
It works because patroni sets the environment variable PGPASSFILE to point to the new pgpass file. It would be a a poor decision to overwrite user's .pgpass with our credentials. |
OK, that works for the name, but the problem is that pgpass gets dropped in the CWD from which patroni was called, regardless of where that is. This causes some issues:
... so I think it would be a better idea to drop the file in a specific directory, or at least provide that as a config option. No? |
Yeah, those seem to be good corner cases we haven't covered yet. Would it be better to just write the file to the home directory of the user that launched patroni? After all, it has the same privacy expectations as .pgpass. |
Yeah, that would work, provided that we can know the homedir. We should have some kind of fallback if it's undefined. Also, a config variable for password_directory, I think |
|
just a note because I won't get to it in the next couple days: the pgpass file created by patroni is named incorrectly. it needs a leading period.
Also, this pgpass file is automatically created in the working directory from which patroni is called, which isn't necessarily the user's home directory.
The text was updated successfully, but these errors were encountered: