problem with pg_standby - Mailing list pgsql-general

From Gerd Koenig
Subject problem with pg_standby
Date
Msg-id 201008032237.13024.koenig@transporeon.com
Whole thread Raw
Responses Re: problem with pg_standby
Re: problem with pg_standby
Re: problem with pg_standby
List pgsql-general
Hello,

we currently setup a standby database with archive_command sending the WALs
from master to standby.
This works as expected, but the standby database doesn't restore the WALs from
the given directory in recovery.conf and I have no idea why...

recovery.conf:
----------------
restore_command = '/usr/bin/pg_standby -d -s 20 -t /tmp/pgsql.trigger.5432
/var/lib/pgsql/wal_exchange %f %p %r 2>>
/var/lib/pgsql/data/pg_log/standby.log'

The file standby.log contains:
--------------------------------
Trigger file            : /tmp/pgsql.trigger.5432
Waiting for WAL file    : 00000001.history
WAL file path           : /var/lib/pgsql/wal_exchange/00000001.history
Restoring to...         : pg_xlog/RECOVERYHISTORY
Sleep interval          : 20 seconds
Max wait interval       : 0 forever
Command for restore     : cp "/var/lib/pgsql/wal_exchange/00000001.history"
"pg_xlog/RECOVERYHISTORY"
Keep archive history    : 000000000000000000000000 and later
running restore         :cp: cannot stat
`/var/lib/pgsql/wal_exchange/00000001.history': No such file or directory
cp: cannot stat `/var/lib/pgsql/wal_exchange/00000001.history': No such file or
directory
cp: cannot stat `/var/lib/pgsql/wal_exchange/00000001.history': No such file or
directory
cp: cannot stat `/var/lib/pgsql/wal_exchange/00000001.history': No such file or
directory
not restored            : history file not found

Trigger file            : /tmp/pgsql.trigger.5432
Waiting for WAL file    : 000000010000001E0000001D.00000020.backup
WAL file path           :
/var/lib/pgsql/wal_exchange/000000010000001E0000001D.00000020.backup
Restoring to...         : pg_xlog/RECOVERYHISTORY
Sleep interval          : 20 seconds
Max wait interval       : 0 forever
Command for restore     : cp
"/var/lib/pgsql/wal_exchange/000000010000001E0000001D.00000020.backup"
"pg_xlog/RECOVERYHISTORY"
Keep archive history    : 000000000000000000000000 and later
WAL file not present yet. Checking for trigger file...
WAL file not present yet. Checking for trigger file...
WAL file not present yet. Checking for trigger file...
WAL file not present yet. Checking for trigger file...
WAL file not present yet. Checking for trigger file...
-------------------------------

And in the directory "/var/lib/pgsql/wal_exchange" I have dozens of WALs in
the meantime, but they didn't get restored, and in the logs I receive "WAL file
not present...."
The file "pg_xlog/RECOVERYHISTORY" doesn't exist, btw..., and the file
xx00000020.backup contains:
""
START WAL LOCATION: 1E/1D000020 (file 000000010000001E0000001D)
STOP WAL LOCATION: 1E/1F000000 (file 000000010000001E0000001E)
CHECKPOINT LOCATION: 1E/1D000020
START TIME: 2010-08-03 21:11:23 CEST
LABEL: initial_backup
STOP TIME: 2010-08-03 21:44:06 CEST
""

I can stop and restart the standby db as often as I want ending up in a
working sync-mechanism, as long as the WALs being copied from master to
standby, right ?

Any help appreciated, many thanks .....GERD.....

pgsql-general by date:

Previous
From: Timothy Garnett
Date:
Subject: When can postgresql use a partial (NOT NULL) index? Seems to depend on size of IN clause (even with enable seqscan = off)
Next
From: Tom Lane
Date:
Subject: Re: When can postgresql use a partial (NOT NULL) index? Seems to depend on size of IN clause (even with enable seqscan = off)