Postgres, does streaming slave affect master health?

Viewed 87

What happens to the master server if streaming slave goes down?

Does master slave get affected in servicing requests from clients?

1 Answers

That depends. If you use asynchronous streaming replication without replication slots, the primary server will be in no way affected if the standby goes down.

Other configurations may cause problems:

  • If you are using synchronous replication and all synchronous standby servers are down, any data modifying transaction will hang indefinitely.

    That's why you need at least two synchronous standby servers if you don't want reduced availability with synchronous replication.

  • If you are using replication slots to retain WAL when the standby goes down, WAL will accumulate on the primary server and can fill up the disk, which will crash the primary server.

Related