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

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

From: Greg Stark <stark(at)mit(dot)edu>
To: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Subject: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL
Date: 2010-02-12 17:47:49
Message-ID: 407d949e1002120947x244a59a4o9df4a79ae636f999@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-docspgsql-hackers
so I from by like having the server doing the cleanup because it down by
necessarily have the while picture. it down nt know of it is the only
replica reading these log files our if the site policy is to keep them for
disaster recovery purposes.

I like having this as an return val command though. Or alternately now that
we have read-only replicas you could implement this by polling the slaves
and asking them what log position they are up to.

greg

On 12 Feb 2010 17:25, "Dimitri Fontaine" <dfontaine(at)hi-media(dot)com> wrote:

Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:

> Attached patch implements pg_standby for use as an
> archive_cleanup_command, reusing existing cod...

> Happy to add the archive_cleanup_command into main server as well, if
> you like. Won't take long....
Would it be possible to have the server do the cleanup (and the cp for
that matter) on its own or use a script?

Either have archive_cleanup = on and either an commented out (empty)
archive_cleanup_command and the same for the restore_command, or a
special magic value, like 'postgresql' to activate the internal one.

This way we have both a zero config working default setup and the
flexibility to adapt to any archiving solution our user might already be
using.

A default archive_command would be nice too. Like you give it a
directory name or a rsync path and it does the basic right thing.

I'm not sure my detailed approach is the right one, but the birdview is
to have the simple case really simple to setup, and the complex cases
still possible. Default included archive, restore and cleanup commands
would be awesome.

Oh, and the basic simple case actually is with a remote standby. Without
NFS or the like, no shared mount point for archiving.

Regards,
--
dim


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
To make changes to your subs...

In response to

pgsql-docs by date

Next:From: Josh BerkusDate: 2010-02-12 18:09:26
Subject: Re: Streaming Replication docs
Previous:From: Dimitri FontaineDate: 2010-02-12 17:25:02
Subject: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL

pgsql-hackers by date

Next:From: Christopher BrowneDate: 2010-02-12 17:54:29
Subject: logtrigger issue in PostgreSQL HEAD
Previous:From: Tom LaneDate: 2010-02-12 17:47:19
Subject: Re: review: More frame options in window functions

pgsql-committers by date

Next:From: User MkzDate: 2010-02-12 19:05:04
Subject: pgbouncer - pgbouncer: Introduce a new configuration setting:
Previous:From: Tom LaneDate: 2010-02-12 17:33:21
Subject: pgsql: Extend the set of frame options supported for window functions.

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