2

I have 2 servers involving master-slave replication (physical replication).

I see the replication using select * from pg_replication_slots; there is a record saying :

user : rep_user`

application : 12/main

state : streaming

I have to change postgresql.conf on the master to enable pg_cron extension so I need to restart the master.

Is it safe to just restart it using : sudo service postgresql stop followed by sudo service postgresql start ? Do I have to drop the replication first before restarting?

thanks

padjee
  • 337
  • 2
  • 11
  • 25

1 Answers1

1

You can always safely restart the primary server with streaming replication. The standby will stay up and will try to reconnect to the primary. As soon as the primary is back up, the standby will connect again.

If you get WAL receiver timeouts, as your comment suggests, you can increase wal_receiver_timeout on the standby.

Laurenz Albe
  • 61,070
  • 4
  • 55
  • 90