"Regenerate password" always fails on Postgres with managed PgBouncer: unsupported startup parameter: statement_timeout
eboles
PROOP

12 hours 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.

Awaiting User Response$20 Bounty

4 Replies

Status changed to Awaiting Railway Response Railway about 12 hours ago


Railway
BOT

12 hours ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway about 12 hours 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.


philllllllllllip
HOBBY

11 hours 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.


eboles
PROOP

10 hours ago

Thanks for the info. I'll file it with Railway support.


7 hours 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 about 7 hours ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...