Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 3285F640825 for ; Mon, 20 Apr 2009 08:15:42 -0300 (ADT) 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 70668-01-5 for ; Mon, 20 Apr 2009 08:15:50 -0300 (ADT) 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 9832163ECB1 for ; Mon, 20 Apr 2009 05:32:28 -0300 (ADT) Received: from source ([209.85.219.177]) by exprod7ob115.postini.com ([64.18.6.12]) with SMTP ID DSNKSewzGiccmiVHkX9iEatZc9NM8CD8bJ7N@postini.com; Mon, 20 Apr 2009 01:32:28 PDT Received: by ewy25 with SMTP id 25so1800716ewy.40 for ; Mon, 20 Apr 2009 01:32:26 -0700 (PDT) Received: by 10.210.11.13 with SMTP id 13mr3436860ebk.36.1240216346256; Mon, 20 Apr 2009 01:32:26 -0700 (PDT) Received: from ?80.223.212.7? (dsl-hkibrasgw2-fed4df00-7.dhcp.inet.fi [80.223.212.7]) by mx.google.com with ESMTPS id 23sm1302951eya.1.2009.04.20.01.32.25 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 20 Apr 2009 01:32:25 -0700 (PDT) Message-ID: <49EC3317.7090209@enterprisedb.com> Date: Mon, 20 Apr 2009 11:32:23 +0300 From: Heikki Linnakangas Organization: EnterpriseDB User-Agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: Andreas Pflug CC: pgsql-hackers Subject: Re: Warm Standby restore_command documentation References: <3f0b79eb0903242329j12865d55s348f5c873a956e71@mail.gmail.com> <3f0b79eb0903311901h70520cc8u9c0f1d8f4193923b@mail.gmail.com> <3f0b79eb0904022042g35b8e3cah9432ff764e721a3@mail.gmail.com> <1d4e0c10904071456m735e3f67q123b87243d2f6f2a@mail.gmail.com> <3f0b79eb0904071817u5c32254ei61f7e68e54669d9e@mail.gmail.com> <49DDEE72.6030803@enterprisedb.com> <3f0b79eb0904092047w355e0b3ar527a9285b161ef91@mail.gmail.com> <1239381103.16396.30.camel@ebony.2ndQuadrant> <3f0b79eb0904122252t1f4c5860v919d199f399ccf72@mail.gmail.com> <1239701740.16396.86.camel@ebony.2ndQuadrant> <3f0b79eb0904140320m29b82150k38dd46e30e78ced9@mail.gmail.com> <49E4D643.3050707@pse-consulting.de> In-Reply-To: <49E4D643.3050707@pse-consulting.de> 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: 200904/1032 X-Sequence-Number: 137135 Andreas Pflug wrote: > I've been following the thread with growing lack of understanding why > this is so hardly discussed, and I went back to the documentation of > what the restore_command should do ( > http://www.postgresql.org/docs/8.3/static/warm-standby.html ) > > While the algorithm presented in the pseudocode isn't dealing too good > with a situation where the trigger is set while the restore_command is > sleeping (this should be handled better in a real implementation), the > code says > > "Restore all wal files. If no more wal files are present, stop restoring > if the trigger is set; otherwise wait for a new wal file". > > Since pg_standby is meant as implementation of restore_command, it has > to follow the directive stated above; *anything else is a bug*. > pg_standby currently does *not* obey this directive, and has that > documented, but a documented bug still is a bug. I think you're interpreting the chapter too strongly. The provided pseudo-code is just an example of a suitable restore_command, it doesn't say that pg_standby behaves exactly like that. I agree we should change the default behavior, though. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com