On 15/11/16 01:44, Tomas Vondra wrote:
> Attached is v6 of the patch series, fixing most of the points:
>
> * common bits (valgrind/randomization/wipe) moved to memdebug.h/c
>
> Instead of introducing a new header file, I've added the prototypes to
> memdebug.h (which was already used for the valgrind stuff anyway), and
> the implementations to a new memdebug.c file. Not sure what you meant by
> "static inlines" though.
I think Andres wanted to put the implementation to the static inline
functions directly in the header (see parts of pg_list or how atomics
work), but I guess you way works too.
>
> I've however kept SlabContext->freelist as an array, because there may
> be many blocks with the same number of free chunks, in which case moving
> the block in the list would be expensive. This way it's simply
> dlist_delete + dlist_push.
>
+1
I get mxact isolation test failures in test_decoding with this version
of patch: step s0w: INSERT INTO do_write DEFAULT VALUES;
+ WARNING: problem in slab TXN: number of free chunks 33 in block
0x22beba0 does not match bitmap 34 step s0start: SELECT data FROM
pg_logical_slot_get_changes('isolation_slot', NULL, NULL,
'include-xids', 'false'); data
and step s0alter: ALTER TABLE do_write ADD column ts timestamptz; step s0w: INSERT INTO do_write DEFAULT VALUES;
+ WARNING: problem in slab TXN: number of free chunks 33 in block
0x227c3f0 does not match bitmap 34 step s0start: SELECT data FROM
pg_logical_slot_get_changes('isolation_slot', NULL, NULL,
'include-xids', 'false'); data
Also, let's just rename the Gen to Generation.
-- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training &
Services