Search Postgresql Archives

Re: Help setting up warm standby replication

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Merlin Moncure wrote:

On 4/16/07, Nico Sabbi <nsabbi@xxxxxxxxxxxxxxxxxxx> wrote:

Is there any parameter that I have to pass to the second server to keep
on requesting WALs?
I still don't understand what instructs the server to continously
request the master's logs.


google pg_standby.  I've set it up and it works.

merlin


Hi,
I installed the second version of pg_standby.tar that you posted here.

In recovery.conf I set
restore_command = '/usr/local/bin/pg_standby -d -c -s 5 -w 0 /tmp/pg/ %f %p'

and I see in the log file that something goes on after every update:

Trigger file         : (null)
Waiting for WAL file : /tmp/pg//000000010000000000000021
WAL file path        : 000000010000000000000021
Restoring to...      : pg_xlog/RECOVERYXLOG
Sleep interval       : 5 seconds
Max wait interval    : 0 forever
Command for restore : cp /tmp/pg//000000010000000000000021 pg_xlog/RECOVERYXLOG
running restore      : success
LOG:  restored file "000000010000000000000021" from archivio


but "cp /tmp/pg//000000010000000000000021 pg_xlog/RECOVERYXLOG" looks suspicious to me.

Is it expected? should WAL files overwrite pg_xlog/RECOVERYXLOG ?
If I stop the replication and start the slave after having removed the recovery.conf
the server doesn't come up:

LOG:  aborting startup due to startup process failure
LOG: database system was interrupted while in recovery at log time 2007-04-16 15:29:42 CEST HINT: If this has occurred more than once some data may be corrupted and you may need to choose an earlier recovery target. LOG: impossibile aprire il file "pg_xlog/000000010000000000000009" (file registro 0, segmento 9): No such file or directory
LOG:  invalid primary checkpoint record
LOG: impossibile aprire il file "pg_xlog/000000010000000000000021" (file registro 0, segmento 33): No such file or directory
LOG:  invalid secondary checkpoint record
PANIC:  impossibile localizzare un checkpoint record valido
LOG:  startup process (PID 10824) was terminated by signal 6
LOG:  aborting startup due to startup process failure


infact pg_xlog/ of the slave contains only RECOVERHISTORY:

cat pg_xlog/RECOVERYHISTORY
START WAL LOCATION: 0/9000020 (file 000000010000000000000009)
STOP WAL LOCATION: 0/A000000 (file 00000001000000000000000A)
CHECKPOINT LOCATION: 0/9000020
START TIME: 2007-04-16 15:29:42 CEST
LABEL: label
STOP TIME: 2007-04-16 15:31:39 CEST

Did I do something wrong?
Thanks for your help,
   Nico


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux