Earlier quoted context omitted.
PostgreSQL upgrades are indeed one of the use cases we have with the gem, the way we do it is: 1. Have app configured to connect to both main and replica. 2. Connect to the rails console and tell the app to stay in read only mode until told otherwise. 3. Disable replication 4. Upgrade main to new PostgreSQL version 5. Tell the app to move back to read-write mode 6. Re-create the replica This flow helped us do hundred…
Oh that's interesting, thanks for the additional detail! I'm intrigued by what you mean when you say: "tell the app to stay in read only mode until told otherwise". Does that mean use the read-only replica connection during that time? If so, did you have to configure some error handling for that timeframe?
Yes!
https://github.com/discourse/discourse/blob/721ee3642558d960...
> If so, did you have to configure some error handling for that timeframe?
Since this was an early goal in the project, the controllers are mostly away of the read-only mode already and know how to deal with it is most places.