Re: xlog file naming

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: xlog file naming
Date: 2011-09-13 03:38:26
Message-ID: CAHGQGwHWqjGeksmP2OterU8P0SJ6X7yPQyH5qqEqcBQSXaAXaw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 13, 2011 at 12:18 PM, Jaime Casanova <jaime(at)2ndquadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2011-09-13 04:41:52 Re: What Would You Like To Do?
Previous Message Jaime Casanova 2011-09-13 03:18:33 Re: xlog file naming