19 days ago
I get this error when regenerating the Postgres password (Database → Config → Connection → Regenerate):
Failed to update database password: Failed to update PostgreSQL password via TCPIP proxy: unsupported startup parameter: statement_timeout
Same error in all three cases:
- With a TCP proxy (→ 5432) on the Postgres service that was created before PgBouncer was added.
- With no TCP proxy (deleted; railway tcp-proxy list showed none).
- With a fresh TCP proxy (→ 5432) created and deleted after PgBouncer was added.
I would hope I don't need to deactivate PgBouncer to be able to regenerate, but "unsupported startup parameter" would seem to be PgBouncer's error, not Postgres's.
Appreciate a fix as this blocks a credential rotation. Railway docs advise against the seemingly only alternative, which is running ALTER ROLE and editing PGPASSWORD by hand.
Pinned Solution
18 days ago
We have fixed this. You should now be able to rotate the password with PgBouncer in front.
I should note that Philip's previous community answer was incorrect.
5 Replies
Status changed to Awaiting Railway Response Railway • 19 days ago
19 days ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • 19 days ago
19 days ago
"unsupported startup parameter" is a PgBouncer error like you said. I believe the cleanest approach here would be to remove PgBouncer temporarily, regenerate the password, and add it again (even though this would drop existing connections). Manually updating the password is the least favorable here, as you would have to sync/update env variables manually, as you already know.
19 days ago
PgBouncer blocks any startup parameter it doesn't recognize unless it's added to ignore_startup_parameters. statement_timeout isn't allowed by default. Railway's "Regenerate" action opens a connection that sends statement_timeout as a startup param, and PgBouncer kills it before it reaches Postgres. That's why it fails the same way in all three of your test cases: PgBouncer sits in the path regardless of the TCP proxy.
You can't fix this from your side. File it with Railway support directly and tell them regenerate needs to either skip PgBouncer or add statement_timeout to ignore_startup_parameters.
19 days ago
Thanks for the info. I'll file it with Railway support.
18 days ago
We have fixed this. You should now be able to rotate the password with PgBouncer in front.
I should note that Philip's previous community answer was incorrect.
Status changed to Awaiting User Response Railway • 18 days ago
Status changed to Solved 0x5b62656e5d • 17 days ago
17 days ago
I was able to rotate the password. For others that may run into this, I then needed to restart PgBouncer (it didn't seem to do so automatically).
Status changed to Awaiting Conductor Response Railway • 17 days ago
Status changed to Solved brody • 16 days ago