Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id A37C89FB6F4 for ; Tue, 26 Jun 2007 08:47:35 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 87748-03 for ; Tue, 26 Jun 2007 08:47:31 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 2CFC79FB730 for ; Tue, 26 Jun 2007 08:47:31 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mail02.ellacoya.com (67-135-29-172.dia.static.qwest.net [67.135.29.172]) by svr4.postgresql.org (Postfix) with ESMTP id F213C5AF038 for ; Tue, 26 Jun 2007 11:47:29 +0000 (GMT) Received: from YZANGXP ([192.168.123.13]) by mail02.ellacoya.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 26 Jun 2007 07:47:27 -0400 From: "George Wilk" To: Subject: warm standby server configuration Date: Tue, 26 Jun 2007 07:47:24 -0400 Message-ID: <016601c7b7e7$c337f060$0d7ba8c0@ellacoya.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0167_01C7B7C6.3C265060" X-Mailer: Microsoft Office Outlook 11 Thread-Index: Ace358L3JYefTVXXQF+siSsBzaHnXw== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 X-OriginalArrivalTime: 26 Jun 2007 11:47:27.0097 (UTC) FILETIME=[C4D4FE90:01C7B7E7] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-3.800.1026-15260.003 X-TM-AS-Result: No--15.530900-4.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.137 tagged_above=0 required=5 tests=BAYES_50=0.001, FORGED_RCVD_HELO=0.135, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200706/271 X-Sequence-Number: 25939 This is a multi-part message in MIME format. ------=_NextPart_000_0167_01C7B7C6.3C265060 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 ------=_NextPart_000_0167_01C7B7C6.3C265060 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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 =3D 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 =3D = "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

 <= /p>

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

 

------=_NextPart_000_0167_01C7B7C6.3C265060--