Re: Dynamic shared memory areas
Thomas Munro <thomas.munro@enterprisedb.com>
From: Thomas Munro <thomas.munro@enterprisedb.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>,
Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2016-11-25T12:48:56Z
Lists: pgsql-hackers
Attachments
- dsa-v7.patch (application/octet-stream) patch v7
On Thu, Nov 24, 2016 at 1:07 AM, Thomas Munro <thomas.munro@enterprisedb.com> wrote: > The attached patch is just for discussion only... I need to resolve > that contiguous_pages question and do some more testing. As Dilip discovered, there was a problem with resource cleanup for DSA areas created inside pre-existing DSM segments, which I've now sorted out in the attached version. I also updated the copyright messages, introduced a couple of the new 'unlikely' macros in the address decoding path, and introduced high_segment_index to avoid scanning bigger segment arrays than is necessary sometimes. As for contiguous_pages_dirty, I see what was missing from earlier attempts at more subtle invalidation: we had failed to set the flag in cases where FreePageManagerGetInternal was called during a FreePageManagerPut operation. What do you think about the logic in this patch... do you see any ways for contiguous_pages to get out of date? There is a new assertion that contiguous_pages matches the state of the freelists at the end of FreePageManagerGet and FreePageManagerPut, enabled if you defined FPM_EXTRA_ASSERTS, and this passes my random allocation pattern testing. -- Thomas Munro http://www.enterprisedb.com
Commits
-
Fix off-by-one Asserts in FreePageBtreeInsertInternal/Leaf.
- dc0a208ac2e9 13.23 landed
- 7b542cdbcdcc 14.20 landed
- 05d8a0869ea4 15.15 landed
- a8838689594d 16.11 landed
- 39d24475c180 17.7 landed
- e7a3fae39e33 18.1 landed
- 9f9a04368f80 19 (unreleased) landed
-
Reserve zero as an invalid DSM handle.
- b40b4dd9e10e 10.0 cited