pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Be more wary about shm_toc_lookup failure.
Date: Fri, 02 Feb 2018 23:32:15 +0000
Message-ID: <E1ehkoZ-0005uX-4B@gemulon.postgresql.org> (raw)

Be more wary about shm_toc_lookup failure.

Commit 445dbd82a basically missed the point of commit d46633506,
which was that we shouldn't allow shm_toc_lookup() failure to lead
to a core dump or assertion crash, because the odds of such a
failure should never be considered negligible.  It's correct that
we can't expect the PARALLEL_KEY_ERROR_QUEUE TOC entry to be there
if we have no workers.  But if we have no workers, we're not going
to do anything in this function with the lookup result anyway,
so let's just skip it.  That lets the code use the easy-to-prove-safe
noError=false case, rather than anything requiring effort to review.

Back-patch to v10, like the previous commit.

Discussion: https://postgr.es/m/3647.1517601675@sss.pgh.pa.us

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/34653bc9833d9c95ed1c52bed1ff01c6193de17b

Modified Files
--------------
src/backend/access/transam/parallel.c | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)



view thread (2+ messages)

Message-ID: <E1ehkoZ-0005uX-4B@gemulon.postgresql.org>
Permalink:  ../E1ehkoZ-0005uX-4B@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ehkoZ-0005uX-4B@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Be more wary about shm_toc_lookup failure.
  In-Reply-To: <E1ehkoZ-0005uX-4B@gemulon.postgresql.org>
  References: <E1ehkoZ-0005uX-4B@gemulon.postgresql.org>

* 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