Controlling replication

For maintenance reasons, it might be necessary to hold and resume replication from time to time. Just imagine a major software update. It might do something nasty to your data structure. You definitely don't want faulty stuff to be replicated to your entire system. Therefore, it can come in handy to stop replication briefly and restart it once things have proven to be fine.

Two functions are available for this job:

SELECT bdr.bdr_apply_pause()

To restart things again, the following procedure can be used:

SELECT bdr.bdr_apply_resume()

Connections to the remote node (or nodes) are retained, but no data is read from them. The effects of pausing apply are not persistent, so the replay will resume if PostgreSQL is restarted or ...

Get PostgreSQL Replication - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.