Skip to content

Instantly share code, notes, and snippets.

@Geesu
Created January 26, 2014 23:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Geesu/8640635 to your computer and use it in GitHub Desktop.
Save Geesu/8640635 to your computer and use it in GitHub Desktop.
standby_mode = 'on' # enables stand-by (readonly) mode
# Connect to the master postgres server using the replicator user we created.
primary_conninfo = 'host=a port=5432 user=replicator password=password'
# Specifies a trigger file whose presence should cause streaming replication to
# end (i.e., failover).
trigger_file = '/tmp/pg_failover_trigger'
# Shell command to execute an archived segment of WAL file series.
# Required for archive recovery if streaming replication falls behind too far.
restore_command = 'cp /var/lib/postgresql/9.2/archive/%f %p'
archive_cleanup_command = '/usr/lib/postgresql/9.2/bin/pg_archivecleanup /var/lib/postgresql/9.2/archive/ %r'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment