Re: Error code for "terminating connection due to conflict with recovery" - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Error code for "terminating connection due to conflict with recovery"
Date
Msg-id AANLkTik5jiSeSaa=0CYHW8HAATsGrcer9+wHHyYc749Z@mail.gmail.com
Whole thread Raw
In response to Re: Error code for "terminating connection due to conflict with recovery"  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: Error code for "terminating connection due to conflict with recovery"  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Mon, Jan 31, 2011 at 10:31 AM, Kevin Grittner
<Kevin.Grittner@wicourts.gov> wrote:
> Bruce Momjian <bruce@momjian.us> wrote:
>> As a novice I am not sure why we _wouldn't_ create two new
>> separate error codes
>
> The argument for using SQLSTATE 40001 for failures which are
> strictly due to concurrency problems, and are likely to work if the
> transaction is retried, is that there is already a lot of software
> which knows how to do that.  On the other hand, going into such code
> to turn that into a list of concurrency failure states is probably
> only going to cause pain to those with applications intended to work
> with multiple DBMS products without much modification.

Yeah, I think that one's pretty logical.  I think my vote is to either
change the drop-database case to be the same as that, or to use a new
error code.  ERRCODE_ADMIN_SHUTDOWN is just strange.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Allowing multiple concurrent base backups
Next
From: Robert Haas
Date:
Subject: Re: Spread checkpoint sync