Looking for a way to migrate Postgres 9.4.5 to the latest version 11.1 with minimum possible downtime.
What we have is:
- Database size - 1.2TB, total # of rows > 4B
- (primary) Postgres 9.4.5 running on AWS (self-managed), this is a primary instance.
- (secondary standby) Secondary instance replicated using Streaming Replication
- Regular disk snapshots and WAL archiving
- Daily logical
backups (
pg_dump)
We tested two options so far: pg_dumpall/pg_restore and pg_upgrade, both options work ok but take more than 48hr to finish.
According to the documentation https://www.postgresql.org/docs/current/upgrading.html#UPGRADING-VIA-REPLICATION there is also Logical Replication option. However, it is my understanding that 9.4 only has a Logical Decoding (not the replication). So this option is not available in our case, correct?
Are there any other options to migrate to v11 with a minimum downtime as possible?