Re: Checkpoint process signal handling seems wrong - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Checkpoint process signal handling seems wrong
Date
Msg-id 28502.984080748@sss.pgh.pa.us
Whole thread Raw
In response to RE: Checkpoint process signal handling seems wrong  ("Mikheev, Vadim" <vmikheev@SECTORBASE.COM>)
List pgsql-hackers
"Mikheev, Vadim" <vmikheev@SECTORBASE.COM> writes:
>> However, while sitting here looking at it I can't help wondering whether
>> the checkpoint process shouldn't have responded to the SIGTERM that the
>> postmaster sent it when the other backend crashed.
>> 
>> Is it really such a good idea for the checkpoint process to ignore
>> SIGTERM?

> Seems not, SIGTERM --> elog(STOP) should be Ok here.

Yes, after further thought this seems not only desirable but
*necessary*.  Else the checkpoint maker might be writing bad data
from corrupted shmem structures, which is exactly what the system-wide
restart mechanism is supposed to prevent.

I'll fix the checkpoint process to accept SIGTERM and SIGUSR1 (but
not SIGINT) from the postmaster.


>> While we're at it: is it really such a good idea to use elog(STOP)
>> all over the place in the WAL stuff?  If XLogFileInit had chosen

> I just hadn't time to consider each particular case.

Okay.  You're right, that probably needs case-by-case thought that
we haven't time for right now.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Performance monitor
Next
From: Tom Lane
Date:
Subject: Re: Query not using index, please explain.