Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 3FE0863236F for ; Thu, 15 Jan 2009 19:54:17 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 44565-09 for ; Thu, 15 Jan 2009 19:54:13 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 0B03863231A for ; Thu, 15 Jan 2009 19:54:13 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id n0FNs3J18213; Thu, 15 Jan 2009 18:54:03 -0500 (EST) From: Bruce Momjian Message-Id: <200901152354.n0FNs3J18213@momjian.us> Subject: Re: BUG #4566: pg_stop_backup() reports incorrect STOP WAL LOCATION In-Reply-To: <3f0b79eb0812052029r1ee3a7b8n4aec36fc36b09d7a@mail.gmail.com> To: Fujii Masao Date: Thu, 15 Jan 2009 18:54:03 -0500 (EST) CC: Randy Isbell , pgsql-bugs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200901/104 X-Sequence-Number: 22086 Heikki has updated the documentation to mention the meaning of this field. Thanks for the report. --------------------------------------------------------------------------- Fujii Masao wrote: > On Fri, Dec 5, 2008 at 11:41 PM, Randy Isbell wrote: > > > > The following bug has been logged online: > > > > Bug reference: 4566 > > Logged by: Randy Isbell > > Email address: jisbell@cisco.com > > PostgreSQL version: 8.3.4 > > Operating system: FreeBSD 6.2 > > Description: pg_stop_backup() reports incorrect STOP WAL LOCATION > > Details: > > > > 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. > > It's a bug of pg_stop_backup(), which has been talked before. > http://archives.postgresql.org/pgsql-hackers/2008-12/msg00108.php > > Attached is a patch against HEAD. I think that we should > also backport. > > Regards, > > -- > Fujii Masao > NIPPON TELEGRAPH AND TELEPHONE CORPORATION > NTT Open Source Software Center [ Attachment, skipping... ] > > -- > Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-bugs -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. +