Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin
John Naylor <johncnaylorls@gmail.com>
From: John Naylor <johncnaylorls@gmail.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Melanie Plageman <melanieplageman@gmail.com>,
Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, Peter Geoghegan <pg@bowt.ie>,
Heikki Linnakangas <hlinnaka@iki.fi>, Pg Hackers <pgsql-hackers@postgresql.org>,
Andres Freund <andres@anarazel.de>, Noah Misch <noah@leadboat.com>
Date: 2024-07-24T07:42:59Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Test that vacuum removes tuples older than OldestXmin
- 2c0bc4765741 17.6 landed
- 303ba0573ce6 18.0 landed
- 80c34692e8e6 17.0 landed
- aa607980aee0 18.0 landed
-
Lower minimum maintenance_work_mem to 64kB
- 2eda3df9ad53 17.0 landed
- bbf668d66fbf 18.0 landed
-
Add accidentally omitted test to meson build file
- 9d198f4d3e3b 16.4 landed
-
Use DELETE instead of UPDATE to speed up vacuum test
- 924a08b76f5d 14.13 landed
- 9744fe24118b 15.8 landed
- 571e0ee40ebd 16.4 landed
-
Revert "Test that vacuum removes tuples older than OldestXmin"
- efcbb76efe40 18.0 landed
- 1a3e90948b50 17.0 landed
-
Ensure vacuum removes all visibly dead tuples older than OldestXmin
- fd4f12df5e46 17.0 landed
- 83c39a1f7f3f 18.0 landed
On Wed, Jul 24, 2024 at 5:40 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > Without MEMORY_CONTEXT_CHECK, if size is 16 bytes, required_size is > also 16 bytes as it's already 8-byte aligned and Bump_CHUNKHDRSZ is 0. > On the other hand with MEMORY_CONTEXT_CHECK, the requied_size is > bumped to 40 bytes as chunk_size is 24 bytes and Bump_CHUNKHDRSZ is 16 > bytes. Therefore, with MEMORY_CONTEXT_CHECK, we allocate more memory > and use more Bump memory blocks, resulting in filling up TidStore in > the test cases. We can easily reproduce this test failure with > PostgreSQL server built without --enable-cassert. It seems that > copperhead is the sole BF animal that doesn't use --enable-cassert but > runs recovery-check. It seems we could force the bitmaps to be larger, and also reduce the number of updated tuples by updating only the last few tuples (say 5-10) by looking at the ctid's offset. This requires some trickery, but I believe I've done it in the past by casting to text and extracting with a regex. (I'm assuming the number of tuples updated is more important than the number of tuples inserted on a newly created table.) As for lowering the limit, we've experimented with 256kB here: https://www.postgresql.org/message-id/CANWCAZZUTvZ3LsYpauYQVzcEZXZ7Qe+9ntnHgYZDTWxPuL++zA@mail.gmail.com As I mention there, going lower than that would need a small amount of reorganization in the radix tree. Not difficult -- the thing I'm concerned about is that we'd likely need to document a separate minimum for DSA, since that behaves strangely with 256kB and might not work at all lower than that.