Re: Crash on promotion when recovery.conf is renamed

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Crash on promotion when recovery.conf is renamed
Дата
Msg-id 17435.1490624429@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Crash on promotion when recovery.conf is renamed  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Ответы Re: Crash on promotion when recovery.conf is renamed  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
Список pgsql-hackers
Alexander Korotkov <a.korotkov@postgrespro.ru> writes:
> On Mon, Mar 27, 2017 at 4:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Actually, the *real* problem with that coding is it lacks a SQLSTATE
>> (errcode call).  The only places where it's acceptable to leave that
>> out are for internal "can't happen" cases, which this surely isn't.

> Surrounding code also has ereports lacking SQLSTATE.  And that isn't "can't
> happen" case as well.
> Should we consider fixing them?

Yup.  Just remember that the default is
XX000    E    ERRCODE_INTERNAL_ERROR              internal_error

If that's not how you want the error case reported, you need an errcode()
call.

We might need more ERRCODEs than are there now, if none of the existing
ones seem to fit these cases.  There's already ERRCODE_DATA_CORRUPTED
and ERRCODE_INDEX_CORRUPTED; maybe we need ERRCODE_WAL_CORRUPTED, for
example?
        regards, tom lane



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

Предыдущее
От: Corey Huinker
Дата:
Сообщение: Re: \if, \elseif, \else, \endif (was Re: PSQL commands:\quit_if, \quit_unless)
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Partitioned tables and relfilenode