problem with pg_standby

From: Gerd Koenig <koenig(at)transporeon(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: problem with pg_standby
Date: 2010-08-03 20:37:12
Message-ID: 201008032237.13024.koenig@transporeon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.....

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-08-03 21:01:15 Re: When can postgresql use a partial (NOT NULL) index? Seems to depend on size of IN clause (even with enable seqscan = off)
Previous Message Scott Marlowe 2010-08-03 20:17:02 Re: optimal memory