Re: SIGTERM -> elog(FATAL) -> proc_exit() is probably a bad idea

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: SIGTERM -> elog(FATAL) -> proc_exit() is probably a bad idea
Date: 2001-01-14 17:21:38
Message-ID: 26408.979492898@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> writes:
>> Why? What difference do you see in the nature of the critical sections?
>> They all look the same to me: hold off cancel/die response.

> I've thought that the main purpose of CRIT_SECTION is to
> force redo recovery for any errors during the CRIT_SECTION
> to complete the critical operation e.g. bt_split().

How could it force redo? Rollback, maybe, but that should happen
anyway.

> Note that elog(ERROR/FATAL) is changed to elog(STOP) if Critical
> SectionCount > 0.

Not in current sources ;-).

Perhaps Vadim will say that I broke his error scheme, but if so it's
his own fault for not documenting such delicate code at all. I believe
he's out of town this weekend, so let's wait till he gets back and then
discuss it some more. Perhaps there is a need to distinguish xlog-
related critical sections from other ones, or perhaps not.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rehak Tamas 2001-01-14 17:26:35 copy from stdin; bug?
Previous Message Hiroshi Inoue 2001-01-14 17:03:08 RE: SIGTERM -> elog(FATAL) -> proc_exit() is probably a bad idea