Re: xlog file naming

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

On Mon, Sep 12, 2011 at 8:44 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Tue, Sep 13, 2011 at 3:36 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
>> The return value of pg_start_backup that currently looks something like
>>
>>  pg_start_backup
>> -----------------
>>  8D1/C9013758
>>
>> should really be
>>
>>  000008D1C9013758
>>
>> (perhaps the timeline should be included?)
>
> This change might break some tools which depends on such a result format.
> Instead of that, what about introducing something like pg_current_timeline()
> function which literally returns the current timeline ID,

until here i found it could have some use

> 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?

> Furthermore, in the same way, we can get the backup end WAL file name or
> current WAL file name from pg_stop_backup() or pg_current_xlog_location(),
> respectively.
>

we can do that already too

--
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 Fujii Masao 2011-09-13 03:38:26 Re: xlog file naming
Previous Message Tatsuo Ishii 2011-09-13 03:17:05 Re: show pool_status like...