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

Re: [BUGS] BUG #4566: pg_stop_backup() reports incorrect STOP WAL LOCATION

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #4566: pg_stop_backup() reports incorrect STOP WAL LOCATION
Date: 2010-02-04 07:28:03
Message-ID: 3f0b79eb1002032328s46af0dcer64692245d3d94210@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-docspgsql-hackers
On Fri, Dec 5, 2008 at 11:41 PM, Randy Isbell <jisbell(at)cisco(dot)com> wrote:
> An inconsistency exists between the segment name reported by
> pg_stop_backup() and the actual WAL file name.
>
>
> SELECT pg_start_backup('filename');
>         pg_start_backup
>        -----------------
>         10/FE1E2BAC
>        (1 row)
>
> Later:
> SELECT pg_stop_backup();
>         pg_stop_backup
>        ----------------
>         10/FF000000
>        (1 row)
>
> The resulting *.backup file:
>
> START WAL LOCATION: 10/FE1E2BAC (file 0000000200000010000000FE)
> STOP WAL LOCATION: 10/FF000000 (file 0000000200000010000000FF)
> CHECKPOINT LOCATION: 10/FE1E2BAC
> START TIME: 2008-11-09 01:15:06 CST
> LABEL: /bck/db/sn200811090115.tar.gz
> STOP TIME: 2008-11-09 01:15:48 CST
>
> In my 8.3.4 instance, WAL file naming occurs as:
>
> ...
> 0000000100000003000000FD
> 0000000100000003000000FE
> 000000010000000400000000
> 000000010000000400000001
> ...
>
> WAL files never end in 'FF'.  This causes a problem when trying to collect
> the ending WAL file for backup.

Sorry for resurrecting an old argument.
http://archives.postgresql.org/message-id/200812051441(dot)mB5EfG1M007309(at)wwwmaster(dot)postgresql(dot)org

I got the complaint about this behavior of the current pg_stop_backup()
in this morning. I thought that this is the bug, and created the patch.
But it was rejected because its change might break the existing app.
Though I'm not sure if there is really such an app. Anyway I think that
something like the following statements should be added into the document.
Thought?

------------
Note that the WAL file name in the backup history file cannot be used
to determine which WAL files are required for the backup. Because it
indicates the subsequent WAL file of the starting or ending one for
the backup, when its location is exactly at a WAL file boundary (What
is worse, sometimes it indicates a nonexistent WAL file).
------------

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Responses

pgsql-docs by date

Next:From: Bruce MomjianDate: 2010-02-04 16:04:58
Subject: Re: Administration book proofreading
Previous:From: Bruce MomjianDate: 2010-02-03 17:25:18
Subject: Re: Administration book proofreading

pgsql-hackers by date

Next:From: Fujii MasaoDate: 2010-02-04 07:51:41
Subject: Re: testing cvs HEAD - HS/SR - cannot stat
Previous:From: Heikki LinnakangasDate: 2010-02-04 06:42:16
Subject: Re: Recent vendor SSL renegotiation patches break PostgreSQL

pgsql-bugs by date

Next:From: Fujii MasaoDate: 2010-02-04 09:23:28
Subject: Re: BUG #5304: psql using conninfo fails in connecting to the server
Previous:From: Joe ConwayDate: 2010-02-04 04:26:52
Subject: Re: BUG #5304: psql using conninfo fails in connecting to the server

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