Обсуждение: warm standby server configuration
Hi there,
A bit of background information:
I am running Postgres 8.2.4 on Solaris 10 in a warm standby configuration. My archive command scp’s WAL logs from the live server to the standby server. The standby server runs in a recovery mode waiting for the WAL logs and processing them as they become available (at least that’s the intent).
The standby server was originally seeded with a copy of the live server PGDATA directory. The live server is configured with the checkpoint_timeout = 5min, resulting in WAL logs being created every 5 minutes. Because this is a test environment, I am testing the backup/recovery scenario w/o any database updates during the test cycle. The warm standby server produces the following error log entry on recovery startup:
LOG: starting archive recovery
LOG: restore_command = "exec /var/ipsc/pgsql/data/recovery_cmd %f %p"
cp: cannot access /var/ipsc/pgsql/WAL/00000001.history
ll /var/ipsc/pgsql
file: 00000001.history
path: pg_xlog/RECOVERYHISTORY
ll /var/ipsc/pgsql
file: 0000000100000000000000B7
path: pg_xlog/RECOVERYXLOG
LOG: restored log file "0000000100000000000000B7" from archive
LOG: record with zero length at 0/B7000340
LOG: invalid primary checkpoint record
ll /var/ipsc/pgsql
file: 0000000100000000000000B7
path: pg_xlog/RECOVERYXLOG
LOG: restored log file "0000000100000000000000B7" from archive
LOG: record with zero length at 0/B70002F0
LOG: invalid secondary checkpoint record
PANIC: could not locate a valid checkpoint record
LOG: startup process (PID 1222) was terminated by signal 6
LOG: aborting startup due to startup process failure
The WAL logs are copied from the live server to the /var/ipsc/pgsqlWAL directory on the standby server. It seems as though the standby server is looking for a history file. Where is this file being produced? I couldn’t find it anywhere on the live server.
The real problem, however, is caused by the “record with zero length” and prevents the standby server from booting up. Since my WAL logs may have no records in them, is this going to be a problem?
As always, your help will be greatly appreciated!
Cheers,
~george