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: | 4C10F8DC.8050708@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
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.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Luxenberg, Scott I. | 2010-06-10 14:42:18 | Error with GIT Repository |
Previous Message | Tom Lane | 2010-06-10 14:38:17 | Re: warning message in standby |