I did this the "hard way" a year ago. This blog post came in handy: https://jstaf.github.io/posts/pglogical/ pglogical is magic. Keeping an eye on this project for the future, looks great.
Minimal downtime major PostgreSQL version upgrades with pg_easy_replicate
11–20 of 63 posts
Re: Minimal downtime major PostgreSQL version upgrades with pg_easy_replicate
#12Much appreciated. I was actually looking into a few options for this exact same thing. I will give this shot right away.
Re: Minimal downtime major PostgreSQL version upgrades with pg_easy_replicate
#13I see one of the requirements is that 'Both databases should have the same schema'. How should I manually load the schema to the new database (running on port 5433 for instance)?
Re: Minimal downtime major PostgreSQL version upgrades with pg_easy_replicate
#14If using this tool for upgrades with minimal downtime, if I understand right, you need to orchestrate your db callers to switch over to the new primary at the right point, when it's ready? Tips for getting that to happen at just the right point to minimize downtime?
Re: Minimal downtime major PostgreSQL version upgrades with pg_easy_replicate
#15Let's say I have a Rails app and I want to do a major postgres version upgrade using this tool. I see one of the requirements is that 'Both databases should have the same schema'. How should I manually load the schema to the new database (running on port 5433 for instance)?
Rather than this ad-hoc thing, you could also try to create a new rails "environment" for this use, I guess.
Re: Minimal downtime major PostgreSQL version upgrades with pg_easy_replicate
#16Let's say I have a Rails app and I want to do a major postgres version upgrade using this tool. I see one of the requirements is that 'Both databases should have the same schema'. How should I manually load the schema to the new database (running on port 5433 for instance)?
Re: Minimal downtime major PostgreSQL version upgrades with pg_easy_replicate
#17Let's say I have a Rails app and I want to do a major postgres version upgrade using this tool. I see one of the requirements is that 'Both databases should have the same schema'. How should I manually load the schema to the new database (running on port 5433 for instance)?
I am exploring some options like loading schema from a schema.sql file or something along the lines of what pg_dump does for schema export.
Would love to hear any ideas.
Re: Minimal downtime major PostgreSQL version upgrades with pg_easy_replicate
#18Too bad it is written in Ruby.
Re: Minimal downtime major PostgreSQL version upgrades with pg_easy_replicate
#19I guess this is pretty similar to what heroku does for pg updates? If using this tool for upgrades with minimal downtime, if I understand right, you need to orchestrate your db callers to switch over to the new primary at the right point, when it's ready? Tips for getting that to happen at just the right point to minimize downtime?
UPDATE: Some more reading material here: https://github.com/shayonj/pg_easy_replicate#switchover-stra...
Re: Minimal downtime major PostgreSQL version upgrades with pg_easy_replicate
#20I did this the "hard way" a year ago. This blog post came in handy: https://jstaf.github.io/posts/pglogical/ pglogical is magic. Keeping an eye on this project for the future, looks great.
Is this true? I thought they fixed that at some point after PG11.