Re: restore_command %r option

Поиск
Список
Период
Сортировка
От Steven Flatt
Тема Re: restore_command %r option
Дата
Msg-id 357fa7590803170353s48b5cb2dob393c4bf3e842288@mail.gmail.com
обсуждение исходный текст
Ответ на Re: restore_command %r option  ("Steven Flatt" <steven.flatt@gmail.com>)
Список pgsql-general
So I had been using the "Time of latest checkpoint" value from pg_controldata, and freely deleting any archive files that were archived prior to this time, but it appears as though this is not safe since after restoring the ".backup" archive file at the start of recovery, I've accidentally deleted some (many) needed archive files.
 
The "Time of latest checkpoint" seemed to move to a date just prior to the time the ".backup" file was archived, which was at the end of a 63-hour file-system-backup of the primary server.  Hence most files archived during the time of the base backup were immediately deleted, and now recovery is hanging waiting for a file that was just removed.
 
How else programmatically can I determine when it is safe to remove archive files?  Do I need to look at the "Minimum recovery ending location"?
 
Your help is much appreciated.
 
Steve

On Mon, Mar 10, 2008 at 12:23 PM, Steven Flatt <steven.flatt@gmail.com> wrote:
Well, after some testing, it appears as though the %r option is not supported on 8.2.4.
 
It also looks as though pg_controldata may have the answer I want, but what is the best programmatic way to determine the earliest archive file that I need to keep?
 
Thanks,
Steve

On Mon, Mar 10, 2008 at 11:32 AM, Steven Flatt <steven.flatt@gmail.com> wrote:
Is the %r option of the restore_command available in PG 8.2.4?  If not, is there any other way to know how many archive files need to be kept on the standby server when in recovery mode?
 
Thanks,
Steve


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

Предыдущее
От: "Albe Laurenz"
Дата:
Сообщение: Re: How to silence psql notices, warnings, etc.?
Следующее
От: "Adam Rich"
Дата:
Сообщение: 8.3.0 upgrade