1

Postgresql has two ways of replication

  • Physical replication
  • Logical replication

with physical replication everything is send over and the servers must have the same major release. Which makes upgrading a bit cumbersome.

With logical replication, Postgresql servers can be different versions, which makes the process of upgrading much easier.

I am leaning more towards using logical replication. I want to use Postgresql in high availability. Does logical replication support hot standby?

3
  • 1
    The subscriber of a logical replication is a regular Postgres instance that is open for reading and writing. But logical replication is not suited for high availability as DDL statements are not replicated to the subscriber. So any time an index is created, a table is ALTERed of CREATEd the same DDL statements have to be run manually at the subscriber which makes it very complicated to manage as a high-availability standby.
    – user1822
    Commented Jun 12, 2019 at 2:39
  • I decided to go with physical replication. Is it necessary to run pg_basebackup when initially setting up the slave?
    – Arya
    Commented Jun 12, 2019 at 3:30
  • Yes. Or you can use the low level backup API, which is more complicated. Commented Jun 12, 2019 at 6:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.