7 days ago
這段你可以直接複製貼去 Railway 支援(station.railway.com 或 Dashboard 右上角 Agent/客服):
Subject: Postgres password variable desync — no "Regenerate" option found in current UI (postgres-ssl template)
Project: okr-system, Environment: production, Service: Postgres (template: railwayapp-templates/postgres-ssl), dependent service: okr-api.
We needed to rotate our Postgres role password for security reasons (the previous credentials had been exposed). While doing so we ran into the following:
- We ran
ALTER USER postgres WITH PASSWORD '<new_password>'directly against the database viarailway connect Postgres. This succeeded (ALTER ROLE). - We then tried to manually update the
PGPASSWORDandPOSTGRES_PASSWORDservice variables in the dashboard to match. After deploying, the edited value appeared to revert back to the old one — we're not fully sure whether this is a UI issue (edit not persisted) or the actual database role password being reconciled back by the platform. - Following this known-issue thread, we looked for the recommended "Regenerate" button under Database > Config, but in our current dashboard version that tab shows the same content as the Data tab (Deployment Online / Required Variables / Database Connection status only) — no Regenerate action is present.
- Our dependent service (
okr-api)'sDATABASE_URLis stored as a literal connection string, not a${{ Postgres.DATABASE_URL }}reference variable, so it won't auto-sync with any change made on the Postgres service side.
Could you help us:
- Confirm the current, actual password state of the
postgresrole on this service (whether it matches the dashboard'sPGPASSWORD/POSTGRES_PASSWORDvalues right now), and - Advise the correct, safe procedure to rotate this password going forward so that the database role, the service variables, and
okr-api'sDATABASE_URLall end up consistent — ideally without downtime for the currently-runningokr-apiservice.
Everything is currently online and healthy; this isn't an active outage, just a rotation we want to complete correctly.
1 Replies
7 days ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • 7 days ago
7 days ago
Just checking, when you edit the POSTGRES_PASSWORD, press "Continue" when it prompts you to, then redeploy, the changes don't reflect?