Re: Error code for "terminating connection due to conflict with recovery"
| От | Josh Berkus |
|---|---|
| Тема | Re: Error code for "terminating connection due to conflict with recovery" |
| Дата | |
| Msg-id | 4D472A11.3070904@agliodbs.com обсуждение исходный текст |
| Ответ на | Re: Error code for "terminating connection due to conflict with recovery" (Simon Riggs <simon@2ndQuadrant.com>) |
| Список | 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 по дате отправления: