pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: pgsql-committers <pgsql-committers@postgresql.org>
Subject: Re: pgsql: Fix another instance of unsafe coding for shm_toc_lookup failure
Date: Fri, 02 Feb 2018 21:08:49 -0500
Message-ID: <9324.1517623729@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEepm=2afhhpgK+11xZWiApaJJ_P=624ZqZP_pM2JSuLVGxGxA@mail.gmail.com>
References: <E1ehkoZ-0005uW-43@gemulon.postgresql.org>
	<CAEepm=2afhhpgK+11xZWiApaJJ_P=624ZqZP_pM2JSuLVGxGxA@mail.gmail.com>

Thomas Munro <thomas.munro@enterprisedb.com> writes:
> On Sat, Feb 3, 2018 at 12:32 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Fix another instance of unsafe coding for shm_toc_lookup failure.

> my mistake was actually to put noError = true there when noError =
> false was called for.

Ah.

> However, it's not surprising that you drew the
> opposite conclusion (ie that it might in fact not be in the TOC),
> since the shm space is really only necessary for EXPLAIN ANALYZE.
> Perhaps I should make it skip setting up this shm stuff if
> !node->ss.ps.instrument, just like the equivalent Sort node code.  I
> will look into that on Monday.

OK.  Please send in a patch to either do that or switch this call to use
noError = false.  Or possibly both: shouldn't there be some other signal
path that tells the worker whether instrumentation is needed?  I'll
leave it alone pending your investigation.

			regards, tom lane




view thread (5+ messages)  latest in thread

Message-ID: <9324.1517623729@sss.pgh.pa.us>
Permalink:  ../9324.1517623729@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9324.1517623729@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, thomas.munro@enterprisedb.com
  Subject: Re: pgsql: Fix another instance of unsafe coding for shm_toc_lookup failure
  In-Reply-To: <9324.1517623729@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