Re: [PoC] Improve dead tuple storage for lazy vacuum

From: John Naylor <johncnaylorls(at)gmail(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Yura Sokolov <y(dot)sokolov(at)postgrespro(dot)ru>
Subject: Re: [PoC] Improve dead tuple storage for lazy vacuum
Date: 2024-03-13 11:04:51
Message-ID: CANWCAZbTATBGXe0xyNppX6UEKo7gqxF6uT=8BnGjVwfDGasLSg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 13, 2024 at 8:39 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:

> As I mentioned above, if we implement the test cases in C, we can use
> the debug-build array in the test code. And we won't use it in AND/OR
> operations tests in the future.

That's a really interesting idea, so I went ahead and tried that for
v71. This seems like a good basis for testing larger, randomized
inputs, once we decide how best to hide that from the expected output.
The tests use SQL functions do_set_block_offsets() and
check_set_block_offsets(). The latter does two checks against a tid
array, and replaces test_dump_tids(). Funnily enough, the debug array
itself gave false failures when using a similar array in the test
harness, because it didn't know all the places where the array should
have been sorted -- it only worked by chance before because of what
order things were done.

I squashed everything from v70 and also took the liberty of switching
on shared memory for tid store tests. The only reason we didn't do
this with the radix tree tests is that the static attach/detach
functions would raise warnings since they are not used.

Attachment Content-Type Size
v71-0002-DEV-Debug-TidStore.patch application/x-patch 7.5 KB
v71-0003-DEV-Fix-failure-to-sort-debug-array-for-iteratio.patch application/x-patch 881 bytes
v71-0005-Use-shared-memory-in-TID-store-tests.patch application/x-patch 1.8 KB
v71-0006-Use-TidStore-to-store-dead-tuple-TIDs-during-laz.patch application/x-patch 43.6 KB
v71-0004-WIP-Use-array-of-TIDs-in-TID-store-regression-te.patch application/x-patch 9.7 KB
v71-0001-Add-TIDStore-to-store-sets-of-TIDs-ItemPointerDa.patch application/x-patch 34.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2024-03-13 11:05:41 Re: POC, WIP: OR-clause support for indexes
Previous Message Heikki Linnakangas 2024-03-13 10:22:20 Re: Vectored I/O in bulk_write.c