Skip site navigation (1) Skip section navigation (2)

Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Dimitri Fontaine <dfontaine(at)hi-media(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL
Date: 2010-02-12 14:34:29
Message-ID: 1265985269.7341.4105.camel@ebony (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-docspgsql-hackers
On Fri, 2010-02-12 at 12:54 +0000, Simon Riggs wrote:

> 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. 

Attached patch implements pg_standby for use as an
archive_cleanup_command, reusing existing code with new -a option.

e.g.

archive_cleanup_command = 'pg_standby -a -d /mnt/server/archiverdir %r'

Happy to add the archive_cleanup_command into main server as well, if
you like. Won't take long.

-- 
 Simon Riggs           www.2ndQuadrant.com

Attachment: archive_cleanup_from_pg_standby.patch
Description: text/x-patch (7.2 KB)

In response to

Responses

pgsql-docs by date

Next:From: Fujii MasaoDate: 2010-02-12 15:47:42
Subject: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL
Previous:From: Heikki LinnakangasDate: 2010-02-12 13:10:21
Subject: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-02-12 14:40:48
Subject: Re: review: More frame options in window functions
Previous:From: Tom LaneDate: 2010-02-12 14:31:27
Subject: Re: Confusion over Python drivers

pgsql-committers by date

Next:From: Simon RiggsDate: 2010-02-12 14:42:58
Subject: Re: [COMMITTERS] pgsql: Reduce the chatter to the log when starting a standby server.
Previous:From: Heikki LinnakangasDate: 2010-02-12 13:10:21
Subject: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group