Update PostgreSQL Replication Mode

With the PATCH request, you can update the replication mode of the PostgreSQL cluster.

circle-exclamation

Which replication mode to choose?

  • Use ASYNCHRONOUS when you prioritize write performance and can tolerate potential data loss on failover.

  • Use STRICTLY_SYNCHRONOUS when data durability is critical, and you have at least 3 replicas.

What are the potential impacts of switching replication modes?

  • Switching to ASYNCHRONOUS from SYNCHRONOUS mode should not pose any downtime.

  • If you are using an ASYNCHRONOUS or SYNCHRONOUS cluster with less than 3 replicas and you decide to switch to the STRICTLY_SYNCHRONOUS mode (which requires 3 replicas at least),

    • You might experience some time where the DB is read-only.

    • The downtime is because the replication mode on writes needs confirmation from at least one synchronous-standby, and the primary is not allowed to continue in the standalone mode. For more information, see Replication Mode.

circle-info

Important: If you are switching to STRICTLY_SYNCHRONOUS mode, we recommend:

  • Performing the replication mode switch outside of the critical business hours.

  • You should first update to 3 replicas, wait for them to be ready, and only then change to STRICTLY_SYNCHRONOUS mode.

Endpoint

Use the following endpoint to update the replication mode for an existing PostgreSQL cluster:https://api.ionos.com/databases/postgresql/clusters/{clusterId}

circle-info

Note: The sample UUID is 498ae72f-411f-11eb-9d07-046c59cc737e.

Request

Response

Last updated

Was this helpful?