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: Get rid of shared_record_typmod_registry_worker_detach; it doesn
Date: Fri, 15 Sep 2017 14:52:35 +0000
Message-ID: <E1dsryt-0001wF-Sc@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Get rid of shared_record_typmod_registry_worker_detach; it doesn't work.

This code is unsafe, as proven by buildfarm failures, because it tries
to access shared memory that might already be gone.  It's also unnecessary,
because we're about to exit the process anyway and so the record type cache
should never be accessed again.  The idea was to lay some foundations for
someday recycling workers --- which would require attaching to a different
shared tupdesc registry --- but that will require considerably more
thought.  In the meantime let's save some bytes by just removing the
nonfunctional code.

Problem identification, and proposal to fix by removing functionality
from the detach function, by Thomas Munro.  I went a bit further by
removing the function altogether.

Discussion: https://postgr.es/m/E1dsguX-00056N-9x@gemulon.postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/71aa4801a8184eb422c6bf51631bda76f1011278

Modified Files
--------------
src/backend/utils/cache/typcache.c | 74 +++++---------------------------------
1 file changed, 9 insertions(+), 65 deletions(-)


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


Message-ID: <E1dsryt-0001wF-Sc@gemulon.postgresql.org>
Permalink:  ../E1dsryt-0001wF-Sc@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1dsryt-0001wF-Sc@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: Get rid of shared_record_typmod_registry_worker_detach; it doesn
  In-Reply-To: <E1dsryt-0001wF-Sc@gemulon.postgresql.org>
  References: <E1dsryt-0001wF-Sc@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