Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 0BABD63296F for ; Fri, 12 Feb 2010 09:10:43 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 56276-09 for ; Fri, 12 Feb 2010 13:10:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og110.obsmtp.com (exprod7og110.obsmtp.com [64.18.2.173]) by mail.postgresql.org (Postfix) with SMTP id 02CD8632F50 for ; Fri, 12 Feb 2010 09:10:31 -0400 (AST) Received: from source ([74.125.78.144]) by exprod7ob110.postini.com ([64.18.6.12]) with SMTP ID DSNKS3VTQ5kdvo9GX3FGbrCin6hHFo6tMply@postini.com; Fri, 12 Feb 2010 05:10:31 PST Received: by ey-out-1920.google.com with SMTP id 3so521032eyh.56 for ; Fri, 12 Feb 2010 05:10:27 -0800 (PST) Received: by 10.213.100.230 with SMTP id z38mr34038ebn.87.1265980224298; Fri, 12 Feb 2010 05:10:24 -0800 (PST) Received: from ?192.168.1.117? (dsl-hkibrasgw2-ff67c300-165.dhcp.inet.fi [88.195.103.165]) by mx.google.com with ESMTPS id 10sm8212210eyd.37.2010.02.12.05.10.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 12 Feb 2010 05:10:22 -0800 (PST) Message-ID: <4B75533D.2000703@enterprisedb.com> Date: Fri, 12 Feb 2010 15:10:21 +0200 From: Heikki Linnakangas Organization: EnterpriseDB User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 To: Simon Riggs CC: Fujii Masao , Dimitri Fontaine , PostgreSQL-development Subject: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL References: <20100127152751.3B2047541B9@cvs.postgresql.org> <4B73F678.8070109@enterprisedb.com> <1265891248.7341.1346.camel@ebony> <4B73FB99.4080403@enterprisedb.com> <1265893599.7341.1454.camel@ebony> <877hqjc2kk.fsf@hi-media-techno.com> <1265896250.7341.1627.camel@ebony> <4B740C6C.3010607@enterprisedb.com> <1265897834.7341.1714.camel@ebony> <4B7412BE.5030605@enterprisedb.com> <3f0b79eb1002112138n61a3258fg9986e50751d44ea0@mail.gmail.com> <1265979080.7341.3679.camel@ebony> In-Reply-To: <1265979080.7341.3679.camel@ebony> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/1005 X-Sequence-Number: 157348 Simon Riggs wrote: > In 8.4 it is pg_standby that was responsible for clearing down the > archive, which is why I suggested using pg_standby for that again. I > agree that will not work. The important thing is not pg_standby but that > we have a valid mechanism for clearing down the archive. Good point. When streaming from the master, the standby doesn't call restore_command, and restore_command doesn't get a chance to clean up old files. > So I suggest that you have a new action that gets called after every > checkpoint to clear down the archive. It will remove all files from the > archive prior to %r. We can implement that as a sequence of unlink()s > from within the server, or we can just call a script to do it. I prefer > the latter approach. However we do it, we need something initiated by > the server to maintain the archive and stop it from overflowing. +1 -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com