Re: xlog file naming - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: xlog file naming
Date
Msg-id CAHGQGwHWqjGeksmP2OterU8P0SJ6X7yPQyH5qqEqcBQSXaAXaw@mail.gmail.com
Whole thread Raw
In response to Re: xlog file naming  (Jaime Casanova <jaime@2ndquadrant.com>)
List pgsql-hackers
On Tue, Sep 13, 2011 at 12:18 PM, Jaime Casanova <jaime@2ndquadrant.com> wrote:
>> and extending
>> pg_xlogfile_name() so that it accepts not only LSN but also the timeline?
>> This idea enables us to get the backup start WAL file name by executing
>> "SELECT pg_xlogfile_name(pg_current_timeline(), pg_start_backup());".
>
> we can do "SELECT pg_xlogfile_name(pg_start_backup())" now, so how is
> that different?

Yeah, no difference. My idea is obviously useless for pg_start_backup()..

What I had in mind was to use the extended pg_xlogfile_name() to calculate
the WAL filename from (for example) pg_controldata executed on the standby.
The timeline which pg_controldata displays might be different from the
current one in the master. So pg_xlogfile_name() which always use the current
timeline might return a wrong WAL filename. Allowing pg_xlogfile_name() to
use the specified timeline to calculate a filename would address that problem.

Regards,

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


pgsql-hackers by date:

Previous
From: Jaime Casanova
Date:
Subject: Re: xlog file naming
Next
From: Magnus Hagander
Date:
Subject: Re: What Would You Like To Do?