Re: [HACKERS] Questions regarding signal handler of postmaster - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Questions regarding signal handler of postmaster
Date
Msg-id 18405.1482794285@sss.pgh.pa.us
Whole thread Raw
In response to [HACKERS] Questions regarding signal handler of postmaster  (Tatsuo Ishii <ishii@sraoss.co.jp>)
Responses Re: [HACKERS] Questions regarding signal handler of postmaster  (Tatsuo Ishii <ishii@sraoss.co.jp>)
List pgsql-hackers
Tatsuo Ishii <ishii@sraoss.co.jp> writes:
> In postmaster.c signal handler pmdie() calls ereport() and
> errmsg_internal(), which could call palloc() then malloc() if
> necessary. Because it is possible that pmdie() gets called while
> malloc() gets called in postmaster, I think it is possible that a
> deadlock situation could occur through an internal locking inside
> malloc().

But we keep signals blocked almost all the time in the postmaster,
so in reality no signal handler can interrupt anything except the
select() wait call.  People complain about that coding technique
all the time, but no one has presented any reason to believe that
it's broken.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: [HACKERS] Questions regarding signal handler of postmaster
Next
From: "Tsunakawa, Takayuki"
Date:
Subject: Re: [HACKERS] Questions regarding signal handler of postmaster