Re: dsm_unpin_segment - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: dsm_unpin_segment
Date
Msg-id a8aeee95-61a4-c5b4-a017-f5077f4b9855@BlueTreble.com
Whole thread Raw
In response to Re: dsm_unpin_segment  (Thomas Munro <thomas.munro@enterprisedb.com>)
Responses Re: dsm_unpin_segment  (Thomas Munro <thomas.munro@enterprisedb.com>)
List pgsql-hackers
On 8/9/16 6:14 PM, Thomas Munro wrote:
>> 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.
> The can't be static, they need to be in shared memory, because we also
> want to protect against two *different* backends pinning it.

Right, this would strictly protect from it happening within a single 
backend. Perhaps it's pointless for pin/unpin, but it seems like it 
would be a good thing to have for attach/detach.
-- 
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: Jim Nasby
Date:
Subject: Re: Heap WARM Tuples - Design Draft
Next
From: Pavan Deolasee
Date:
Subject: Re: Heap WARM Tuples - Design Draft