From: | senthilnathan <senthilnathan(dot)t(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Copying timeline history file to standby |
Date: | 2011-12-14 05:10:06 |
Message-ID: | 1323839406204-5073536.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
We are using 9.1.,
We have a set up like a master and 2 standby servers. M -- > S1,S2 . Both
standby S1 and S2 share the same archive. Master will have an Virtual IP.
Both stand by servers will be replicated using this virtual ip.
Assume the master fails,using our heart beat mechanism Virtual IP bound to
S1(if S1 is ahead or equal to S2 XLOG).,
Is it required to copy the time line history file that is generated at time
of S1 promotion as master to the archive directory of S2 for replication to
work (i.e S1(new master) to S2.) without restarting S2
or
Is there any command in restore_command to be modified in recovery.conf
----------------------------------------------
Replication related configuration that are set in primary.,(postgresql.conf)
wal_level = hot_standby
hot_standby = on
archive_mode = on
archive_command = 'cp %p ../archive/%f'
---------------------------------------------
recovery.conf:
restore_command = 'cp ../archive/%f "%p"'
standby_mode = 'on'
primary_conninfo = 'host=IP port=5432 user=user password=pass'
trigger_file = '/tmp/pg_failover_trigger'
recovery_target_timeline='latest'
---------------------------------------
*** if you copy(manually) the history file to the archive directory of S2
the replication catches up with S1 with out restarting S2.
Without doing this history file copy from S1 to S2, S2 keeps throwing the
following error message.,
2011-12-07 17:29:46 IST::@:[18879]:FATAL: could not receive data from WAL
stream: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
cp: cannot stat `../archive/000000010000000000000005': No such file or
directory
2011-12-07 17:29:49 IST::@:[18875]:LOG: record with zero length at 0/5D8FFC0
cp: cannot stat `../archive/000000010000000000000005': No such file or
directory
cp: cannot stat `../archive/00000002.history': No such file or directory
2011-12-07 17:29:49 IST::@:[20362]:FATAL: timeline 2 of the primary does not
match recovery target timeline 1
cp: cannot stat `../archive/000000010000000000000005': No such file or
directory
cp: cannot stat `../archive/000000010000000000000005': No such file or
directory
cp: cannot stat `../archive/00000002.history': No such file or directory
2011-12-07 17:29:54 IST::@:[20367]:FATAL: timeline 2 of the primary does not
match recovery target timeline 1
cp: cannot stat `../archive/000000010000000000000005': No such file or
directory
cp: cannot stat `../archive/000000010000000000000005': No such file or
directory
cp: cannot stat `../archive/00000002.history': No such file or directory
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Copying-timeline-history-file-to-standby-tp5073536p5073536.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2011-12-14 05:22:32 | Re: Having Issue Getting the Postgresql Service to Start |
Previous Message | Maxim Boguk | 2011-12-14 04:54:16 | Question about HoT updates and conditional indexes |