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-12-02T20:46:47Z
Lists: pgsql-hackers
Attachments
- fix-dsa-pointer-format.patch (application/octet-stream) patch
On Sat, Dec 3, 2016 at 9:02 AM, Robert Haas <robertmhaas@gmail.com> wrote: > On Fri, Dec 2, 2016 at 2:56 PM, Robert Haas <robertmhaas@gmail.com> wrote: >> On Fri, Dec 2, 2016 at 1:21 PM, Robert Haas <robertmhaas@gmail.com> wrote: >>> On Thu, Dec 1, 2016 at 6:33 AM, Thomas Munro >>> <thomas.munro@enterprisedb.com> wrote: >>>> Please find attached dsa-v8.patch, and also a small test module for >>>> running random allocate/free exercises and dumping the internal >>>> allocator state. >>> >>> OK, I've committed the main patch. >> >> ...but the buildfarm isn't very happy about it. >> >> tern complains: >> >> In file included from dsa.c:58:0: >> ../../../../src/include/utils/dsa.h:59:1: error: unknown type name >> 'pg_atomic_uint64' >> typedef pg_atomic_uint64 dsa_pointer_atomic; >> >> ...but that code is only compiled if #if DSA_POINTER_SIZEOF == 4 fails >> to be true. And that should always be true unless >> PG_HAVE_ATOMIC_U64_SUPPORT is defined. So apparently tern claims to >> PG_HAVE_ATOMIC_U64_SUPPORT but doesn't actually define >> pg_atomic_uint64? That doesn't seem right. > > No, that's not the problem. Just a garden variety thinko in dsa.h. > Will push a fix presently. Here's a patch to provide the right format string for dsa_pointer to printf-like functions, which clears a warning coming from dsa_dump (a debugging function) on 32 bit systems. -- 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