Re: pending patch: Re: Streaming replication and pg_xlogfile_name() - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: pending patch: Re: Streaming replication and pg_xlogfile_name()
Date
Msg-id 4BBC227A.2040702@enterprisedb.com
Whole thread Raw
In response to Re: pending patch: Re: Streaming replication and pg_xlogfile_name()  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
Fujii Masao wrote:
> On Tue, Apr 6, 2010 at 11:48 PM, Heikki Linnakangas
> <heikki.linnakangas@enterprisedb.com> wrote:
>> Fujii Masao wrote:
>>> On Tue, Apr 6, 2010 at 8:02 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
>>>>> Should we throw an error in pg_xlogfile_name() if called during
>>>>> recovery? It's not doing anything useful as it is.
>>>> I have no objection for now.
>>> Here is the patch.
>>> ...
>>> +     if (RecoveryInProgress())
>>> +             ereport(ERROR,
>>> +                             (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
>>> +                              errmsg("recovery is in progress"),
>>> +                              errhint("WAL control functions cannot be executed during recovery.")));
>>> +
>> The hint is a bit confusing for pg_xlogfile_name(). pg_xlogfile_name()
>> is hardly a WAL control function like pg_start/stop_backup() are. How
>> about "pg_xlogfile_name() cannot be executed during recovery."?
> 
> OK. Here is the revised patch.

Thanks, committed.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: SELECT constant; takes 15x longer on 9.0?
Next
From: Takahiro Itagaki
Date:
Subject: Re: Set LC_COLLATE to de_DE_phoneb