Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 129D46334C8 for ; Tue, 21 Apr 2009 12:41:56 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 95334-09 for ; Tue, 21 Apr 2009 12:41:53 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og105.obsmtp.com (exprod7og105.obsmtp.com [64.18.2.163]) by mail.postgresql.org (Postfix) with SMTP id 99436633488 for ; Tue, 21 Apr 2009 12:41:53 -0300 (ADT) Received: from source ([74.125.78.25]) by exprod7ob105.postini.com ([64.18.6.12]) with SMTP ID DSNKSe3pQBn5lDC4ALazdR0QTfOXfSSfJKA6@postini.com; Tue, 21 Apr 2009 08:41:53 PDT Received: by ey-out-2122.google.com with SMTP id d26so209150eyd.43 for ; Tue, 21 Apr 2009 08:41:51 -0700 (PDT) Received: by 10.210.81.10 with SMTP id e10mr3264800ebb.9.1240328511846; Tue, 21 Apr 2009 08:41:51 -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 28sm3666424eyg.26.2009.04.21.08.41.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 21 Apr 2009 08:41:51 -0700 (PDT) Message-ID: <49EDE93D.80208@enterprisedb.com> Date: Tue, 21 Apr 2009 18:41:49 +0300 From: Heikki Linnakangas Organization: EnterpriseDB User-Agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: Andreas Pflug CC: Fujii Masao , Simon Riggs , Guillaume Smet , Tom Lane , Peter Eisentraut , Kevin Grittner , pgsql-hackers Subject: Re: New trigger option of pg_standby References: <3f0b79eb0903242329j12865d55s348f5c873a956e71@mail.gmail.com> <3f0b79eb0904132241p18084914g792cb8e5ab3eebb3@mail.gmail.com> <3f0b79eb0904150101pb1c59a3ubb422867e8e6a944@mail.gmail.com> <49EC3B01.6050509@enterprisedb.com> <3f0b79eb0904200354u41b54017u16dc73d021c03cdb@mail.gmail.com> <49EC8B06.3020204@enterprisedb.com> <1240311836.23905.206.camel@ebony.fara.com> <49EDAB5B.5040400@enterprisedb.com> <1240313150.23905.222.camel@ebony.fara.com> <49EDADD6.1090006@enterprisedb.com> <3f0b79eb0904210448l36d9bb27u8b832540010a6f20@mail.gmail.com> <49EDD9D8.9020102@pse-consulting.de> In-Reply-To: <49EDD9D8.9020102@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/1089 X-Sequence-Number: 137192 Andreas Pflug wrote: > I'm a little confused. After pg_standby returned non-zero as indication > for end-of-recovery, the startup process shouldn't request another file > from pg_standby, right? Non-zero return value from restore_command doesn't mean end-of-recovery, it means file-not-found. The server will try to open the WAL file from pg_xlog if it's not found in archive (= restore_command returned non-zero). If it's found in pg_xlog, it will then ask for the next WAL file from the archive again. And on top of that, the server will ask for history files until it finds one that doesn't exist to figure out the new timeline. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com