1. Eric Radman
  2. pg-verify

Source

pg-verify /

Filename Size Date modified Message
1.2 KB
736 B
1.6 KB

Verify PostgreSQL Standby Servers

Running a delayed standby using recovery_min_apply_delay is a zero-maintenance way to establish point-in-time recovery for a PostgreSQL database. pg_verify provides a simple way to ensure that a standby is following close behind the master database.

Invocation

The first parameter is the name of the backup directory, and the second is the master database where the verification script will run a query to determine the current txid:

# /etc/cron.d/pg_verify
MAILTO=alerts
10  8   *   *   *   postgres bin/pg_verify.sh /pg_data/9.6 mydb-writer