Re: Error code for "terminating connection due to conflict with recovery"

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Error code for "terminating connection due to conflict with recovery"
Дата
Msg-id 1296548275.1779.8060.camel@ebony
обсуждение исходный текст
Ответ на Re: Error code for "terminating connection due to conflict with recovery"  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Error code for "terminating connection due to conflict with recovery"  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Mon, 2011-01-31 at 20:52 -0500, Tom Lane wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > On Mon, Jan 31, 2011 at 7:25 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> Robert Haas <robertmhaas@gmail.com> writes:
> >>> Seems a little weird to me, since the administrator hasn't done
> >>> anything.
> 
> >> Sure he has: he issued the DROP DATABASE command that's causing the
> >> system to disconnect standby sessions.
> 
> > Well, I'm not sure how much this matters - as long as it's a dedicated
> > error code, the user can write code to DTRT somehow.  But I don't buy
> > your argument.  Ultimately, user activity causes any kind of recovery
> > conflict.
> 
> Well, yeah, but the predictability of the failure is pretty variable.
> In this case we can say that the error definitely would not have
> occurred if somebody hadn't done a DROP DATABASE on the master while
> there were live sessions in that DB on the slave.  I think that's a
> sufficiently close coupling to say that the error is the result of an
> operator action.  OTOH, the occurrence of deadlocks is (usually) a lot
> more dependent on random-chance timing of different transactions, and
> you usually can't point to any action that intentionally caused a
> deadlock.

ERRCODE_DATABASE_DROPPED    57P04   looks best

The previous code was 57P01 so this is least change, if nothing else.

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: wildcard search support for pg_trgm
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: bad links in messages from commits