-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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(deployment): Postgres healthcheck, add username to pg_isready #10221
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From https://pgpedia.info/p/pg_isready.html I understand that the db and user flags aren't even really relevant, so we shouldn't need to set them. I'm fine with whatever though :P
This explains why it still worked in testing. That wiki page states: “ However the server will log the validity of the connection attempt.”
|
Yeah, I think that error log on #10219 is just a red herring and we don't actually need this change. |
The pg_pedia wiki page you linked explains this error exactly, doesn’t it? It says if a non existing user (root in this case) connects, it will still get a status 0 ready result, but PG will log it as a FATAL error. That doesn’t seem good. |
The healthcheck succeeds. Postgres logs a spooky error, but that isn't actually a hard problem, it just doesn't look very nice. |
Oh yes, I agree with you there. I thought you were saying we shouldn’t make this change, but I guess you meant it’s not the true underlying source of that other issue? |
Both, but with a very weak should - I think this change is fine but probably unnecessary. |
I believe this is the cause of the
FATAL: role "root" does not exist
error that has been popping up. In my testing pg_isready is available to all users, but that might not be the case in all installations.Might fix #10219