Re: Streaming rep - why log shipping is necessary?

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: Streaming rep - why log shipping is necessary?
Дата
Msg-id 3f0b79eb1003030515r5ecc5d13y4f06f6b6389e8bcf@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Streaming rep - why log shipping is necessary?  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
On Fri, Feb 26, 2010 at 2:34 AM, Josh Berkus <josh@agliodbs.com> wrote:
>
>>> If you're adventurous enough, it's actually possible to set an
>>> archive_command that checks the status of the standby and returns
>>> failure as long as the standby still needs the given WAL segment. That
>>> way the primary doesn't recycle segments that are still needed by the
>>> standby, and you can get away without restore_command in the standby.
>
> I'd prefer something a little different ... is there any way to tell
> which log segments a standby still needs, *from* the standby?

pg_controldata can tell that. The log segment containing the "Latest
checkpoint's REDO location" that pg_controldata reports is the oldest
one still required for the standby. So we can remove the older log
segments than it from the archive.

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: recovery.conf.sample
Следующее
От: Robert Haas
Дата:
Сообщение: Re: renameatt() can rename attribute of index, sequence, ...