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

Re: Command to prune archive at restartpoints

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Greg Stark <gsstark(at)mit(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Command to prune archive at restartpoints
Date: 2010-06-10 14:38:20
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

Robert Haas wrote:
>> It won't kill us to change that sentence. "pg_standby is only used now
>> within the cleanup command" etc
>> pg_standby already contains the exact logic we need here. Having two
>> sets of code for the same thing isn't how we do things.

Well, we could factor out that part of the code so it could be used in 
two binaries. But ...

>>> Maybe we could add a new pg_cleanuparchive binary, but we'll need some
>>> discussion...
>> Which will go nowhere, as we both already know.
> I have a feeling that I may be poking my nose into an incipient
> shouting match, but FWIW I agree with Heikki that it would be
> preferable to keep this separate from pg_standby.  Considering that
> Andrew wrote this in 24 lines of Perl code (one-third of which are
> basically just there for logging purposes), I'm not that worried about
> code duplication, unless what we actually need is significantly more
> complicated.

I think my logic needs a tiny piece of adjustment, to ignore the 
timeline segment of the file name. But that will hardly involve a great 
deal of extra code - just chop off the first 8 chars. It's not like the 
code for this in pg_standby.c is terribly complex.

The virtue of a perl script is that it's very easily customizable, e.g. 
you might only delete files if they are older than a certain age.



In response to


pgsql-hackers by date

Next:From: Luxenberg, Scott I.Date: 2010-06-10 14:42:18
Subject: Error with GIT Repository
Previous:From: Tom LaneDate: 2010-06-10 14:38:17
Subject: Re: warning message in standby

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