Re: Command to prune archive at restartpoints

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Command to prune archive at restartpoints
Дата
Msg-id 4C10F8DC.8050708@dunslane.net
обсуждение исходный текст
Ответ на Re: Command to prune archive at restartpoints  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Command to prune archive at restartpoints  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: warning message in standby
Следующее
От: "Luxenberg, Scott I."
Дата:
Сообщение: Error with GIT Repository