0

I'm preparing a migration from PG9.2 to 10.4. The database is large and uses streaming replication. The plan is to switch to logical replication. pg_upgrade works like a charm in a very reasonable amount of time on the master but, as there are over 100GB of data with a significant number of indexes, the initial replication takes several hours...

I wondered if there is a fast way to jump start the replication. As I understand, if I rsync the database storage the logical replication (publication + subscription) will most probably truncate the tables before start... Any suggestions?

Michael
  • 41,989
  • 11
  • 82
  • 128

1 Answers1

0

I sent the same question to the PostgreSQL mailing list and got great insight. You can find the response at: https://www.postgresql.org/message-id/CAJ7S9TVygExihaXt2E1bNH_0kGnx8bA62fmGreDGWTwb3_Pi7g@mail.gmail.com

In short:
- sticking to streaming in the short-term is the fastest path to set up the replication server
- once the service is back in shape, consider switching to logical replication

Note that, according to the documentation, both can operate at the same time.