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-24T12:19:36Z
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
Attachments
- v1-0001-WIP-set-minimum-maintenance_work_mem-to-64kB-matc.patch (text/x-patch) patch v1-0001
On Wed, Jul 24, 2024 at 2:42 PM John Naylor <johncnaylorls@gmail.com> wrote: > 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. For experimentation, here's a rough patch (really two, squashed together for now) that allows m_w_m to go down to 64kB. drop table if exists test; create table test (a int) with (autovacuum_enabled=false, fillfactor=10); insert into test (a) select i from generate_series(1,2000) i; create index on test (a); update test set a = a + 1; set maintenance_work_mem = '64kB'; vacuum (verbose) test; INFO: vacuuming "john.public.test" INFO: finished vacuuming "john.public.test": index scans: 3 pages: 0 removed, 91 remain, 91 scanned (100.00% of total) The advantage with this is that we don't need to care about MEMORY_CONTEXT_CHECKING or 32/64 bit-ness, since allocating a single large node will immediately blow the limit, and that will happen fairly quickly regardless. I suspect going this low will not work with dynamic shared memory and if so would need a warning comment.