Skip site navigation (1) Skip section navigation (2)

PITR - Bug or feature?

From: Rafael Martinez <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: PITR - Bug or feature?
Date: 2010-02-01 10:33:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

Today we have got one PITR backup history file in one of our systems
with a format change.

The PITR backup history file named
pg_xlog/000000010000003800000000.00000020.backup included this information:
START WAL LOCATION: 38/20 (file 000000010000003800000000)
STOP WAL LOCATION: 38/88 (file 000000010000003800000000)
START TIME: 2010-02-01 07:20:05 CET
STOP TIME: 2010-02-01 07:22:42 CET

As you can see, the second number in START/STOP and CHECKPOINT LOCATION
has a length of 2. This second number usually has a length of 8.

I have checked the logs from our last 5000 PITR jobs and the format of
these values has always been "<some number>/<8 digits number>"

We have been using the "<some number>/<8 digits>" ID returned by the
pg_start_backup() function to find out the PITR backup history file we
have to wait for in the archive directory, before we can delete old WAL
files that are not needed anymore. This task gets more complicated if we
cannot trust to get a consistent format from pg_start_backup().

These are some thoughts that may help to debug this issue:

* The postgresql version with this 'problem' is 8.3.9
* The active WAL ID when we started and stopped PITR ends with '00'
* We have not seen this change of format in 8.3.9 when the WAL ID does
  not ends with '00'
* We have had WAL files ending with '00' with versions < 8.3.9 and the
  format used have been the expected ("<some number>/<8 digits>").

Any thoughts about this? Is this a bug or a 'feature'?

Thanks in advance.
 Rafael Martinez, <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no>
 Center for Information Technology Services
 University of Oslo, Norway

 PGP Public Key:


pgsql-hackers by date

Next:From: Fujii MasaoDate: 2010-02-01 10:36:59
Subject: Re: Re: [COMMITTERS] pgsql: Write a WAL record whenever we perform an operation without
Previous:From: Heikki LinnakangasDate: 2010-02-01 10:30:43
Subject: Re: [COMMITTERS] pgsql: Write a WAL record whenever we perform an operation without

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group