postgresqlreplicationsynchronoushigh-availabilitylog-shipping

Does my master server crash using Log-Shipping Synchronous Replication in Postgresql when the replica is down?


I'm searching for HA solutions without load balancing in the master-slave model, using postgresql. My favorite solution so far is log shipping synchronous replication. But I have one main concern, and that is, if my slave server becomes unavailable, will my master server continue it's operation? Or will it wait for the acknowledgment of my slave server until it's up again?


Solution

  • If you have only one standby, the master will halt ( by design ).

    The master will still serve read-only statements, but all writes will be blocked until the standby comes back.

    You can avoid this scenario by providing multiple candidates in synchronous_standby_names.

    See SYNCHRONOUS-REPLICATION in the PostgreSQL Docs.