Determining oldest WAL for Archiving PITR Standby

From: Brian Wipf <brian(at)clickspace(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Determining oldest WAL for Archiving PITR Standby
Date: 2007-10-17 06:01:03
Message-ID: 6E6B46AF-6686-43C6-BACB-1379272B6F6A@clickspace.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm working on a script that takes backups in intervals from our warm
PITR stand by server (both servers running PG 8.2.5). The
documentation advises "running pg_controldata on the standby server
to inspect the control file and determine the current checkpoint WAL
location". I am hoping someone can confirm how to perform this step.

From pg_controldata:
Latest checkpoint location: 8E/624808
Latest checkpoint's TimeLineID: 1
Using the timeline id of 1, log id of 8E and log segment of 0, the
oldest WAL needed for a recoverable backup is 000000010000008E00000000

It's not obvious to me why the output in this example doesn't
indicate a log segment of 62 and offset of 4808, or a log segment of
6 and offset of 24808. It would be less ambiguous if pg_controldata
didn't strip leading zeros from the log segment so that the first two
hex digits after the slash would be the log segment. What is the rule
for determining the log segment from pg_controldata's output?

Thanks for the help!

Brian Wipf
ClickSpace Interactive Inc.
<brian(at)clickspace(dot)com>

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ow Mun Heng 2007-10-17 06:06:43 Poor Plan selected w/ not provided a date/time but selecting date/time from a table
Previous Message Magnus Hagander 2007-10-17 05:20:56 Re: 8.2.3: Server crashes on Windows using Eclipse/Junit