pgsql: Get rid of shared_record_typmod_registry_worker_detach; it doesn

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Get rid of shared_record_typmod_registry_worker_detach; it doesn
Date: 2017-09-15 14:52:35
Message-ID: E1dsryt-0001wF-Sc@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2017-09-15 14:55:17 Re: pgsql: Add support for coordinating record typmods among parallel worke
Previous Message Tom Lane 2017-09-15 14:33:37 Re: pgsql: Add support for coordinating record typmods among parallel worke