Re: testing cvs HEAD - HS/SR - xlog timeline 0 pg_xlogfile_name_offset - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: testing cvs HEAD - HS/SR - xlog timeline 0 pg_xlogfile_name_offset
Date
Msg-id 3f0b79eb1002250125i3c00c892l6080351eca84df07@mail.gmail.com
Whole thread Raw
In response to Re: testing cvs HEAD - HS/SR - xlog timeline 0 pg_xlogfile_name_offset  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: testing cvs HEAD - HS/SR - xlog timeline 0 pg_xlogfile_name_offset
List pgsql-hackers
On Thu, Feb 25, 2010 at 5:10 PM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> A quick fix would be to just throw an error if you try to use
> pg_xlog_filename() during hot standby. But there seems to be good
> reasons to call pg_xlog_filename() during hot standby, given that both
> of you ran into the same issue. What exactly were you trying to achieve
> with it?

Nothing ;) Frankly I just found that problem while testing the
combination of SR and system administration functions. But on
second thought, calling pg_xlogfile_name() during HS seems useful
to remove old WAL files from the archive that is shared from
multiple standbys. In this case, '%r' in restore_command cannot
be used, so we would need to calculate the name of the WAL files
that are not required for the subsequent recovery yet by using
pg_xlogfile_name() and pg_controldata etc.

Regards,

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


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Streaming rep - why log shipping is necessary?
Next
From: Heikki Linnakangas
Date:
Subject: Odd CVS revision number