From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | marcin mank <marcin(dot)mank(at)gmail(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Streaming rep - why log shipping is necessary? |
Date: | 2010-03-03 13:15:57 |
Message-ID: | 3f0b79eb1003030515r5ecc5d13y4f06f6b6389e8bcf@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Feb 26, 2010 at 2:34 AM, Josh Berkus <josh(at)agliodbs(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2010-03-03 13:42:15 | Re: renameatt() can rename attribute of index, sequence, ... |
Previous Message | Fujii Masao | 2010-03-03 12:51:29 | Re: recovery.conf.sample |