Live data from Hacker News

Minimal downtime major PostgreSQL version upgrades with pg_easy_replicate

github.com

1–10 of 63 posts

Re: Minimal downtime major PostgreSQL version upgrades with pg_easy_replicate

#2
Looks very interesting!

> The switch is made by putting the user on the source database in READ ONLY mode, so that it is not accepting any more writes and waits for the flush lag to be 0. It is up to user to kick of a rolling restart of your application containers or failover DNS (more on these below in strategies) after the switchover is complete, so that your application isn't sending any read/write requests to the old/source database.

This does mean that there will be a "downtime" during which the DB is in read-only mode, right? I understand this period can be really small, but that depends on how long the app deployment takes.

Re: Minimal downtime major PostgreSQL version upgrades with pg_easy_replicate

#4

The title says "zero downtime" but the GitHub tagline says "minimal downtime" Zero... data loss maybe?

Was just going to comment this. It's specifically:

> This ensures zero data loss and minimal downtime for the application.

Re: Minimal downtime major PostgreSQL version upgrades with pg_easy_replicate

#5
post #2

Looks very interesting! > The switch is made by putting the user on the source database in READ ONLY mode, so that it is not accepting any more writes and waits for the flush lag to be 0. It is up to user to kick of a rolling restart of your application containers or failover DNS (more on these below in strategies) after the switchover is complete, so that your application isn't sending any read/write requests to the…

Thanks for taking a look!

Thats right, it was a typo. Mean't zero data loss and minimal downtime. There are some strategies in the readme like using weighted based DNS failover to reduce the downtime even less without requiring application deployment.

Re: Minimal downtime major PostgreSQL version upgrades with pg_easy_replicate

#10
post #9

Be careful if you have sequences as those are not replicated. https://www.jacobreed.dev/blog/migrate-postgres-instances

I will update the readme to mention this - but the lib takes care of updating sequence with the data catchup: https://github.com/shayonj/pg_easy_replicate/blob/13ad6af51f...
Post reply on HN