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

From Josh Berkus
Subject Re: Error code for "terminating connection due to conflict with recovery"
Date
Msg-id 4D472A11.3070904@agliodbs.com
Whole thread Raw
In response to Re: Error code for "terminating connection due to conflict with recovery"  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On 1/31/11 11:26 AM, Simon Riggs wrote:
> The purpose of errcodes is to allow programs to check them and then act.
> It's pointless to add a new errcode that is so rare that nobody will
> ever program for it because they won't expect it, let alone test for it.
> Or at least won't assign any sensible priority to handling that error.

Personally, I would prefer a new error code because I *intend* to write
specific code to deal with replication cancellation.  Without a specific
code, then I cannot distinguish replication cancel from whatever else
it's lumped in with, except by regexping the error message.

If we're not going to get a new code, then I'd prefer DEADLOCK_DETECTED
because the behavior we expect from the client (try the whole
transaction over from the beginning) is the same.

--                                  -- Josh Berkus                                    PostgreSQL Experts Inc.
                        http://www.pgexperts.com
 


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: SSI patch version 14
Next
From: Greg Smith
Date:
Subject: Re: Spread checkpoint sync