Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 3B639133798E for ; Thu, 11 Nov 2010 13:10:29 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 82042-03 for ; Thu, 11 Nov 2010 17:10:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-fx0-f46.google.com (mail-fx0-f46.google.com [209.85.161.46]) by mail.postgresql.org (Postfix) with ESMTP id B36A71337B91 for ; Thu, 11 Nov 2010 13:10:20 -0400 (AST) Received: by fxm16 with SMTP id 16so1506978fxm.19 for ; Thu, 11 Nov 2010 09:10:19 -0800 (PST) Received: by 10.223.78.139 with SMTP id l11mr322346fak.31.1289495419057; Thu, 11 Nov 2010 09:10:19 -0800 (PST) Received: from [192.168.1.100] (c-76-102-27-65.hsd1.ca.comcast.net [76.102.27.65]) by mx.google.com with ESMTPS id e6sm1009000fav.8.2010.11.11.09.10.14 (version=SSLv3 cipher=RC4-MD5); Thu, 11 Nov 2010 09:10:16 -0800 (PST) Subject: Re: Recovery bug From: Jeff Davis To: Heikki Linnakangas Cc: pgsql-bugs@postgresql.org In-Reply-To: <4CDC17C4.4060502@enterprisedb.com> References: <1287183483.30681.54.camel@jdavis-ux.asterdata.local> <1287355728.8516.383.camel@jdavis> <4CBD6458.4050400@enterprisedb.com> <1287507095.8516.547.camel@jdavis> <1287517214.20345.5.camel@jdavis-ux.asterdata.local> <4CC56DA5.3040908@enterprisedb.com> <1288022672.8516.801.camel@jdavis> <4CC687CB.6080306@enterprisedb.com> <1289434809.22581.99.camel@jdavis-ux.asterdata.local> <4CDC17C4.4060502@enterprisedb.com> Content-Type: text/plain; charset="UTF-8" Date: Thu, 11 Nov 2010 09:10:14 -0800 Message-ID: <1289495414.18031.1.camel@jdavis> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201011/79 X-Sequence-Number: 28659 On Thu, 2010-11-11 at 18:20 +0200, Heikki Linnakangas wrote: > On 11.11.2010 02:20, Jeff Davis wrote: > > There is a problem with this patch. ReadRecord() not only modifies > > global variables, it also modifies the location pointed to by "record", > > which is later used to set "wasShutdown". How about if we only set > > "wasShutdown" if there is no backup_label (because the checkpoint for > > pg_start_backup() will never be a shutdown checkpoint anyway)? > > Oh, good catch. > > > Trivial patch attached. > > Hmm, you're assuming that the checkpoint specified in the backup label > is never a shutdown checkpoint. I guess that's true, but I'd rather do > this (patch attached). > Looks good to me. Thanks! > (StartupXLOG is quite a mess...) Agreed. Regards, Jeff Davis