From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tatsuo Ishii <ishii(at)postgresql(dot)org> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Error code for "terminating connection due to conflict with recovery" |
Date: | 2011-01-11 11:22:03 |
Message-ID: | AANLkTin5MKdMZkbnz0r_LQ_a2KQSiSBVwqTzW27Ute9S@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jan 11, 2011 at 1:30 AM, Tatsuo Ishii <ishii(at)postgresql(dot)org> wrote:
>> On Sat, Jan 8, 2011 at 9:52 AM, Tatsuo Ishii <ishii(at)postgresql(dot)org> wrote:
>>> While looking at the backend code, I realized that error code for
>>> "terminating connection due to conflict with recovery" is
>>> ERRCODE_ADMIN_SHUTDOWN.
>>>
>>> I thought the error code is for somewhat a human interruption, such as
>>> shutdown command issued by pg_ctl. Is the usage of the error code
>>> appropreate?
>>
>> That doesn't sound right to me. I'd have thought something in class 40.
>
> What about:
>
> 40004 CONFLICT WITH RECOVERY conflict_with_recovery
We should respect the following convention, from errcodes.h:
* The convention is that new error codes defined by PostgreSQL in a
* class defined by the standard have a subclass value that begins
* with 'P'. In addition, error codes defined by PostgreSQL clients
* (such as ecpg) have a class value that begins with 'Y'.
And don't forget there are three places where the new error code would
need to be added.
Otherwise, +1.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2011-01-11 11:23:08 | Re: system views for walsender activity |
Previous Message | Robert Haas | 2011-01-11 11:20:27 | Re: Bug in pg_describe_object |