Re: HandleParallelMessages contains CHECK_FOR_INTERRUPTS? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: HandleParallelMessages contains CHECK_FOR_INTERRUPTS?
Date
Msg-id 20300.1470170558@sss.pgh.pa.us
Whole thread Raw
In response to Re: HandleParallelMessages contains CHECK_FOR_INTERRUPTS?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
>> I notice you just removed the CHECK_FOR_INTERRUPTS in
>> HandleParallelMessages().  Did you notice that HandleParallelMessages
>> calls shm_mq_receive(), which calls shm_mq_receive_bytes(), which
>> contains a CHECK_FOR_INTERRUPTS() call?

After study, I believe that that CHECK_FOR_INTERRUPTS() is unreachable
given that HandleParallelMessages passes nowait = true.  But it's not
unlikely that future changes in shm_mq.c might introduce such calls that
are reachable.

> I wonder whether we should make use of HOLD_INTERRUPTS/RESUME_INTERRUPTS
> to avoid the recursion scenario here.

I concluded that that would be good future-proofing, whether or not it's
strictly necessary today, so I pushed it.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Why we lost Uber as a user
Next
From: Alvaro Herrera
Date:
Subject: Re: PostgreSQL 10 kick-off