From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Merge prune, freeze and vacuum WAL record formats
Date: Mon, 25 Mar 2024 13:01:48 +0000
Message-ID: <E1rojxU-005ZjT-0P@gemulon.postgresql.org> (raw)
Merge prune, freeze and vacuum WAL record formats
The new combined WAL record is now used for pruning, freezing and 2nd
pass of vacuum. This is in preparation for changing VACUUM to write a
combined prune+freeze record per page, instead of separate two
records. The new WAL record format now supports that, but the code
still always writes separate records for pruning and freezing.
This reserves separate XLOG_HEAP2_* info codes for when the pruning
record is emitted for on-access pruning or VACUUM, per Peter
Geoghegan's suggestion. The record format is identical, but having
separate info codes makes it easier analyze pruning and vacuuming with
pg_waldump.
The function to emit the new WAL record, log_heap_prune_and_freeze(),
is in pruneheap.c. The existing heap_log_freeze_plan() and its
subroutines are moved to pruneheap.c without changes, to keep them
together with log_heap_prune_and_freeze().
Author: Melanie Plageman <melanieplageman@gmail.com>
Discussion: https://www.postgresql.org/message-id/CAAKRu_azf-zH%3DDgVbquZ3tFWjMY1w5pO8m-TXJaMdri8z3933g@mail.gma...
Discussion: https://www.postgresql.org/message-id/CAAKRu_b2oE4GL%3Dq4g9mcByS9yT7wTQvEH9OLpabj28e%2BWKFi2A@mail.g...
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/f83d709760d84253b539ee454ce9ce1ceb9ad9ac
Modified Files
--------------
src/backend/access/gist/gistxlog.c | 8 +-
src/backend/access/hash/hash_xlog.c | 9 +-
src/backend/access/heap/heapam.c | 473 ++++++++-----------------------
src/backend/access/heap/pruneheap.c | 407 ++++++++++++++++++++++----
src/backend/access/heap/vacuumlazy.c | 24 +-
src/backend/access/rmgrdesc/heapdesc.c | 230 ++++++++++-----
src/backend/replication/logical/decode.c | 6 +-
src/include/access/heapam.h | 19 +-
src/include/access/heapam_xlog.h | 220 +++++++++-----
src/include/access/xlog_internal.h | 2 +-
src/tools/pgindent/typedefs.list | 7 +-
11 files changed, 805 insertions(+), 600 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: heikki.linnakangas@iki.fi, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Merge prune, freeze and vacuum WAL record formats
In-Reply-To: <E1rojxU-005ZjT-0P@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox