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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Error code for "terminating connection due to conflict with recovery"
Дата
Msg-id 25486.1296440318@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Error code for "terminating connection due to conflict with recovery"  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Error code for "terminating connection due to conflict with recovery"  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Sun, Jan 30, 2011 at 8:42 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> BTW, so far as this goes:
>> http://archives.postgresql.org/pgsql-hackers/2011-01/msg01152.php
>> we should certainly *not* have the same text for two different
>> SQLSTATEs. �If it's worth distinguishing two cases then it's worth
>> providing different texts that make it clear what the cases are.

> Well, then we either need to change the error codes to be the same, or
> the texts to be different.

> The only case in which we emit ERRCODE_ADMIN_SHUTDOWN is when the
> database gets dropped out from underneath the HS backend.  I don't
> think it's worth having a separate path just to handle that case; if
> the user retries the operation it should quickly become clear that the
> database is gone.

Somone, Tatsuo-san IIRC, was saying that pgpool would really like to
know the difference so that it doesn't have to retry at all.  I'm not
sure how useful that really is, but that's the argument for having a
distinct SQLSTATE.  If we do believe that that's useful, I think it
should be a unique new SQLSTATE that never means anything other than
"your database got deleted from under you".  Piggybacking that meaning
on an existing SQLSTATE definitely seems completely bogus to me.
        regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Error code for "terminating connection due to conflict with recovery"
Следующее
От: Robert Haas
Дата:
Сообщение: Re: We need to log aborted autovacuums