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

From: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: 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 05:06:56
Message-ID: CAJKUy5hzV3K72UJHp4pCCJWx+a411VrMA9xVfcgB33NSk2Ts_g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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?

[1] http://archives.postgresql.org/message-id/CAHGQGwHWqjGeksmP2OterU8P0SJ6X7yPQyH5qqEqcBQSXaAXaw@mail.gmail.com

--
Jaime Casanova         www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-03-23 08:52:40 Re: Standbys, txid_current_snapshot, wraparound
Previous Message Fujii Masao 2012-03-23 04:06:48 Reporting WAL file containing checkpoint's REDO record in pg_controldata's result