pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: HandleParallelMessages contains CHECK_FOR_INTERRUPTS?
Date: Tue, 02 Aug 2016 16:42:38 -0400
Message-ID: <20300.1470170558@sss.pgh.pa.us> (raw)
In-Reply-To: <14869.1470083848@sss.pgh.pa.us>
References: <20160801202058.GA529842@alvherre.pgsql>
	<14869.1470083848@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (4+ messages)

Message-ID: <20300.1470170558@sss.pgh.pa.us>
Permalink:  ../20300.1470170558@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20300.1470170558@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com
  Subject: Re: HandleParallelMessages contains CHECK_FOR_INTERRUPTS?
  In-Reply-To: <20300.1470170558@sss.pgh.pa.us>
  References: <20160801202058.GA529842@alvherre.pgsql> <14869.1470083848@sss.pgh.pa.us> <20300.1470170558@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox