Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id D413D63233A for ; Thu, 15 Jan 2009 11:24:04 -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 79085-02 for ; Thu, 15 Jan 2009 11:23:53 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og115.obsmtp.com (exprod7og115.obsmtp.com [64.18.2.217]) by mail.postgresql.org (Postfix) with SMTP id E7ADA632338 for ; Thu, 15 Jan 2009 11:23:52 -0400 (AST) Received: from source ([209.85.219.21]) by exprod7ob115.postini.com ([64.18.6.12]) with SMTP ID DSNKSW9VBrTQca4tsSeZJjaKeodmg+KAZhoZ@postini.com; Thu, 15 Jan 2009 07:23:52 PST Received: by ewy14 with SMTP id 14so1708539ewy.19 for ; Thu, 15 Jan 2009 07:23:50 -0800 (PST) Received: by 10.210.79.14 with SMTP id c14mr1747925ebb.194.1232033030050; Thu, 15 Jan 2009 07:23:50 -0800 (PST) Received: from ?88.195.102.92? (dsl-hkibrasgw2-ff66c300-92.dhcp.inet.fi [88.195.102.92]) by mx.google.com with ESMTPS id d2sm147413nfc.41.2009.01.15.07.23.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 15 Jan 2009 07:23:48 -0800 (PST) Message-ID: <496F5502.4020907@enterprisedb.com> Date: Thu, 15 Jan 2009 17:23:46 +0200 From: Heikki Linnakangas Organization: EnterpriseDB User-Agent: Mozilla-Thunderbird 2.0.0.17 (X11/20081018) MIME-Version: 1.0 To: Fujii Masao CC: Bruce Momjian , Randy Isbell , pgsql-bugs@postgresql.org Subject: Re: BUG #4566: pg_stop_backup() reports incorrect STOP WAL LOCATION References: <200901150150.n0F1oV113850@momjian.us> <496F2795.70105@enterprisedb.com> <3f0b79eb0901150615g133f845erc39faf19793d5977@mail.gmail.com> In-Reply-To: <3f0b79eb0901150615g133f845erc39faf19793d5977@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200901/95 X-Sequence-Number: 22077 Fujii Masao wrote: > On Thu, Jan 15, 2009 at 9:09 PM, Heikki Linnakangas > wrote: >> 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. > > My patch doesn't change the return value of pg_stop_backup(), it's still > the same as the return value of pg_switch_xlog(). Oh, ok. > Only a part of backup > history file (the file name including stop wal location) is changed. > Currently, the file name is wrong if stop wal location indicates a boundary > byte. This would confuse the user, I think. Hmm, I guess that would make it less confusing. Seems quite dangerous to change the meaning now, however :-(. A program (or person) that knows its current meaning would currently wait for STOP WAL filename - 1 file to be archived. If we change the meaning, the same program would determine that the backup is safe, even if the last xlog file hasn't yet been archived. So I think this is not back-portable. Should we change it in HEAD? I'm leaning towards no, on the grounds that tools/people would then have to know the version it's dealing with to interpret the value correctly, and because pg_stop_backup() now waits for the last xlog file to be archived before returning, there's little need to look at that file. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com