Re: Severity of elog(FATAL) should vary by process

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Severity of elog(FATAL) should vary by process
Дата
Msg-id 20061121014646.GJ13555@alvh.no-ip.org
обсуждение исходный текст
Ответ на Severity of elog(FATAL) should vary by process  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:

> Rather than try to change a lot of elog call sites, what I'm thinking
> would be a good plan is to make the FATAL-exit case in elog.c always
> exit with exit(1) (right now it tests a couple of different conditions
> to decide what to return).  Then, in the postmaster, consider an exit
> code of 1 to be either OK or not OK depending on which child it came
> from.  I think there are a small number of exit(1) calls that might
> need to be changed to exit(2) because they are trying to force the
> postmaster to do a panic restart, but it should be a minimal patch.

I was going to suggest using symbolic names to exit codes instead of
hardcoding 1 or 2.  We do that in Mammoth replicator, and use the exit
codes to determine whether the postmaster needs to take special action
for different replication scenarios, e.g. when one needs to promote a
master server to slave or vice versa.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


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

Предыдущее
От: "Merlin Moncure"
Дата:
Сообщение: Re: quick review
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Day and month name localization uses wrong locale category