Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id B70AF62DBD9 for ; Thu, 15 Jan 2009 08:10:15 -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 66487-04 for ; Thu, 15 Jan 2009 08:10:06 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og109.obsmtp.com (exprod7og109.obsmtp.com [64.18.2.171]) by mail.postgresql.org (Postfix) with SMTP id 5A54E632333 for ; Thu, 15 Jan 2009 08:10:03 -0400 (AST) Received: from source ([209.85.219.13]) by exprod7ob109.postini.com ([64.18.6.12]) with SMTP ID DSNKSW8nmav7XDfm1+FLBltc5kW7AfUy5j6v@postini.com; Thu, 15 Jan 2009 04:10:06 PST Received: by ewy6 with SMTP id 6so1219773ewy.18 for ; Thu, 15 Jan 2009 04:10:00 -0800 (PST) Received: by 10.210.66.13 with SMTP id o13mr161485eba.124.1232021400669; Thu, 15 Jan 2009 04:10:00 -0800 (PST) Received: from ?88.195.102.92? ([88.195.102.92]) by mx.google.com with ESMTPS id k9sm341735nfh.17.2009.01.15.04.09.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 15 Jan 2009 04:09:59 -0800 (PST) Message-ID: <496F2795.70105@enterprisedb.com> Date: Thu, 15 Jan 2009 14:09:57 +0200 Organization: EnterpriseDB User-Agent: Mozilla-Thunderbird 2.0.0.17 (X11/20081018) MIME-Version: 1.0 To: Bruce Momjian CC: Fujii Masao , Randy Isbell , pgsql-bugs@postgresql.org Subject: Re: BUG #4566: pg_stop_backup() reports incorrect STOP WAL LOCATION References: <200901150150.n0F1oV113850@momjian.us> In-Reply-To: <200901150150.n0F1oV113850@momjian.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit From: Heikki Linnakangas X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200901/90 X-Sequence-Number: 22072 I think not (http://archives.postgresql.org/pgsql-hackers/2008-12/msg00126.php). The return value of pg_stop_backup() is currently the same as pg_switch_xlog()'s: the location of the last byte before the XLOG switch + 1. The proposed patch would remove the "+ 1". Seems like an unnecessary API change, and I don't recall any reason why the new definition would be better. A fix for the broken waiting behavior discussed in that thread was committed. Bruce Momjian wrote: > Would someone please tell me if this should be applied? > > --------------------------------------------------------------------------- > > 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 > -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com