Re: testing cvs HEAD - HS/SR - xlog timeline 0 pg_xlogfile_name_offset

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Erik Rijkers <er(at)xs4all(dot)nl>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: testing cvs HEAD - HS/SR - xlog timeline 0 pg_xlogfile_name_offset
Date: 2010-02-25 10:22:24
Message-ID: 4B864F60.70804@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fujii Masao wrote:
> On Thu, Feb 25, 2010 at 5:10 PM, Heikki Linnakangas
> <heikki(dot)linnakangas(at)enterprisedb(dot)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.

Yeah. The current pg_*_last_location() functions don't cut it though,
you need to retain logs back to the redo location of the last
restartpoint. That's what %r returns. Maybe we should add another function?

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Boszormenyi Zoltan 2010-02-25 10:26:12 Re: NaN/Inf fix for ECPG
Previous Message marcin mank 2010-02-25 09:55:48 Re: Streaming rep - why log shipping is necessary?