Search Postgresql Archives

Help setting up warm standby replication

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

 



Hi,
after having read the documentation and the few posts in this list I tried to set up a warm standby replication between two instances of postgres running on my pc
in 2 different base directories and 2 different ports.
(The second one was a cp -a of the first one after having created a backup point) . I don't need a realtime update: even few minutes of lag are good enough for my needs.


To begin with I followed the example of the docs: in the recovery.conf file of the
slave instance I  set

restore_command = 'cp -av /var/lib/pgsql/data/pg_xlog/%f  %p'

but at restart I got these messages in the logs (some translation from
italian to english by me) :
LOG:  system shutdown at 2007-04-13 13:02:51 CEST
LOG:  starting archive recovery
LOG:  restore_command = "cp -av /var/lib/pgsql/data/pg_xlog/%f %p"
cp: impossibile fare stat di `/var/lib/pgsql/data/pg_xlog/00000001.history': No such file or directory `/var/lib/pgsql/data/pg_xlog/000000010000000000000007' -> `pg_xlog/RECOVERYXLOG'
LOG:  restored file "000000010000000000000007" from archive
LOG:  invalid record length at 0/7000218
LOG:  invalid primary record checkpoint
`/var/lib/pgsql/data/pg_xlog/000000010000000000000007' -> `pg_xlog/RECOVERYXLOG'
LOG:  restored file "000000010000000000000007" from archive
LOG:  invalid record length at 0/70001D0
LOG:  invalid primary record checkpoint
PANIC:  impossible locating a valid record checkpoint
LOG:  startup process (PID 20250) was terminated by signal 6
LOG:  aborting startup due to startup process failure

same thing if I empty the pg_xlog/ dir (except archive_status/)

I hope someone can explain what  I did wrong.

Another thing I didn't understand is the continous replication mechanism:
will the slave server periodically call the recovery_command or do I
have to setup a cronjob to instruct it to search updates?

Sorry if these questions are stupid :) and thanks in advance.

   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