pgsql: Allow DSM segments to be created as pinned

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Allow DSM segments to be created as pinned
Date: 2017-03-28 22:46:20
Message-ID: E1cszsa-0001XL-1E@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Allow DSM segments to be created as pinned

dsm_create and dsm_attach assumed that a current resource owner was
always in place. Exploration with the API show that this is
inconvenient: sometimes one must create a dummy resowner, create/attach
the DSM, only to pin the mapping later, which is wasteful. Change
create/attach so that if there is no current resowner, the dsm is
effectively pinned right from the start.

Discussion: https://postgr.es/m/20170324232710.32acsfsvjqfgc6ud@alvherre.pgsql
Reviewed by Thomas Munro.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/767bc028e5f001351feb498acef9a87c123093d6

Modified Files
--------------
src/backend/storage/ipc/dsm.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2017-03-29 00:56:34 pgsql: Change 'diag' to 'note' in TAP tests
Previous Message Tom Lane 2017-03-28 22:05:25 pgsql: Make new expression eval code reject references to dropped colum