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

From Simon Riggs
Subject Re: Error code for "terminating connection due to conflict with recovery"
Date
Msg-id 1295601383.1803.9264.camel@ebony
Whole thread Raw
In response to Re: Error code for "terminating connection due to conflict with recovery"  (Tatsuo Ishii <ishii@postgresql.org>)
Responses Re: Error code for "terminating connection due to conflict with recovery"
List pgsql-hackers
On Fri, 2011-01-21 at 13:49 +0900, Tatsuo Ishii wrote:
> > 
> > I'm pretty well convinced that we should NOT be issuing
> > ERRCODE_ADMIN_SHUTDOWN for a recovery conflict, but that could be
> > fixed by a trivial simplification of the code posted above, without
> > introducing any new error code.
> 
> I agree with ERRCODE_ADMIN_SHUTDOWN should not be used for a recovery
> conflict. And if your proposal does not need to introduce new error
> code, I also agree with not inventing new error code.

> > I'd also be in favor of changing the one that uses
> > ERRCODE_QUERY_CANCELLED to use ERRCODE_T_R_SERIALIZATION_FAILURE, as
> > the former might be taken to imply active user intervention, and for
> > consistency.
> 
> +1.

We already use ERRCODE_T_R_SERIALIZATION_FAILURE for retryable errors,
which is almost every error. So no change required there.

ERRCODE_ADMIN_SHUTDOWN is used only in situations where we cannot
reconnect or retry because the database we said we wished to connect to
no longer exists. That needs to be a different error code to a normal,
retryable error, so that pgpool can tell the difference between things
it can help with and things it cannot help with.

-- Simon Riggs           http://www.2ndQuadrant.com/books/PostgreSQL Development, 24x7 Support, Training and Services



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: SSI and Hot Standby
Next
From: Heikki Linnakangas
Date:
Subject: Re: SSI and Hot Standby