Skip site navigation (1) Skip section navigation (2)

Re: Reporting WAL file containing checkpoint's REDO record in pg_controldata's result

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Jaime Casanova <jaime(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Reporting WAL file containing checkpoint's REDO record in pg_controldata's result
Date: 2012-03-23 09:54:17
Message-ID: CABUevEwbhQcb+0M-GfWbTKMBBoEDvxUoYa5eC0rHf1eOqHxEYg@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Fri, Mar 23, 2012 at 10:51, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Fri, Mar 23, 2012 at 2:06 PM, Jaime Casanova <jaime(at)2ndquadrant(dot)com> wrote:
>> On Thu, Mar 22, 2012 at 11:06 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>>>
>>> We can use
>>> pg_xlogfile_name function to calculate that, but it cannot be executed in
>>> the standby. Another problem is that pg_xlogfile_name always uses
>>> current timeline for the calculation, so if the reported timeline is not
>>> the same as current one, pg_xlogfile_name cannot return the correct WAL
>>> file name. Making pg_controldata report that WAL file name gets rid of
>>> such a complexity.
>>>
>>
>> i would think that pg_xlogfile_name() is not allowed in the standby
>> because ThisTimelineId is not very well defined in recovery but if you
>> extend pg_xlogfile_name() to also receive a timelineid as you
>> suggested in [1] then that version of the function could be allowed in
>> the standby.
>> or there is something else i'm missing?
>>
>> is that enough for you to solve your problem?
>
> Yes, we can more easily calculate the cutoff point by using that extended
> pg_xlogfile_name(). But if pg_controldata reports the WAL file name, we
> can calculate the cutoff point without starting the server. So I think that
> it's worth changing pg_controldata that way even if we extend
> pg_xlogfile_name().

+1 - I think they're both useful things, each on it's own.

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

pgsql-hackers by date

Next:From: Fujii MasaoDate: 2012-03-23 10:13:58
Subject: Re: Reporting WAL file containing checkpoint's REDO record in pg_controldata's result
Previous:From: Fujii MasaoDate: 2012-03-23 09:51:10
Subject: Re: Reporting WAL file containing checkpoint's REDO record in pg_controldata's result

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group