Re: dsm_unpin_segment - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: dsm_unpin_segment
Date
Msg-id 7e3bee99-6be0-e976-ab2a-f000196785a3@BlueTreble.com
Whole thread Raw
In response to Re: dsm_unpin_segment  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: dsm_unpin_segment  (Thomas Munro <thomas.munro@enterprisedb.com>)
List pgsql-hackers
On 8/9/16 1:01 PM, Robert Haas wrote:
> However, I don't see the need for a full-blown request
> counter here; we've had this API for several releases now and to my
> knowledge nobody has complained about the fact that you aren't
> supposed to call dsm_pin_segment() multiple times for the same
> segment.

Could a couple of static variables be used to ensure multiple pin/unpin 
and attach/detach calls throw an assert() (or become a no-op if asserts 
are disabled)? It would be nice if we could protect users from this.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)   mobile: 512-569-9461



pgsql-hackers by date:

Previous
From: Vladimir Sitnikov
Date:
Subject: Re: Slowness of extended protocol
Next
From: Jim Nasby
Date:
Subject: Re: Heap WARM Tuples - Design Draft