Both postgres machine are on 9.0.12When I set wal_level = 'hot_standby' on master and hot_standby = 'on' in slave.It does do streaming repl but no archiving on master?# masterwal_level = 'hot_standby'archive_mode = onarchive_command = '../pgscripts/archive.sh %p %f'# - Streaming Replication -max_wal_senders = 3wal_keep_segments = 8# slavewal_level = 'hot_standby'archive_mode = onarchive_command = '../pgscripts/archive.sh %p %f'checkpoint_segments = 8hot_standby = onmaster log:------------------LOG: connection received: host=[local]LOG: connection authorized: user=pgsql database=postgresLOG: connection received: host=192.168.4.223 port=56788LOG: replication connection authorized: user=repuser host=192.168.4.223 port=56788slave log:------------------LOG: entering standby modeLOG: consistent recovery state reached at 6/B2000078LOG: database system is ready to accept read only connectionsLOG: streaming replication successfully connected to primaryLOG: connection received: host=[local]LOG: connection authorized: user=pgsql database=postgresCreate recovery.conf# Note that recovery.conf must be in $PGDATA directory.# Specifies whether to start the server as a standby. In streaming replication,# this parameter must to be set to on.standby_mode = 'on'# Specifies a connection string which is used for the standby server to connect# with the primary.primary_conninfo = 'host=192.168.4.233 port=5432 user=repuser password=changeme'# Specifies a trigger file whose presence should cause streaming replication to# end (i.e., failover).trigger_file = '/var/db/pgsql_backup/postgresql.trigger.standby'# Specifies a command to load archive segments from the WAL archive. If# wal_keep_segments is a high enough number to retain the WAL segments# required for the standby server, this may not be necessary. But# a large workload can cause segments to be recycled before the standby# is fully synchronized, requiring you to start again from a new base backup.# restore_command = 'cp /var/db/pgsql_backup/archive/%f "%p"'# archive_cleanup_command = 'pg_archivecleanup /var/db/pgsql_backup/archive %r'
Monday, October 21, 2013
Postgres Replication with Archiving on Master.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment