From: Melanie Plageman <melanieplageman@gmail.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Eliminate COPY FREEZE use of XLOG_HEAP2_VISIBLE
Date: Thu, 09 Oct 2025 20:30:45 +0000
Message-ID: <E1v6xHh-000tLE-0m@gemulon.postgresql.org> (raw)
Eliminate COPY FREEZE use of XLOG_HEAP2_VISIBLE
Instead of emitting a separate WAL XLOG_HEAP2_VISIBLE record for setting
bits in the VM, specify the VM block changes in the
XLOG_HEAP2_MULTI_INSERT record.
This halves the number of WAL records emitted by COPY FREEZE.
Author: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Reviewed-by: Kirill Reshke <reshkekirill@gmail.com>
Discussion: https://postgr.es/m/flat/CAAKRu_ZMw6Npd_qm2KM%2BFwQ3cMOMx1Dh3VMhp8-V7SOLxdK9-g%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/d96f87332b3786abd23cba47459546799c562b8c
Modified Files
--------------
src/backend/access/heap/heapam.c | 43 ++++++++++++--------
src/backend/access/heap/heapam_xlog.c | 49 ++++++++++++++++++++++-
src/backend/access/heap/visibilitymap.c | 70 ++++++++++++++++++++++++++++++++-
src/backend/access/rmgrdesc/heapdesc.c | 6 +++
src/include/access/visibilitymap.h | 4 ++
5 files changed, 154 insertions(+), 18 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: melanieplageman@gmail.com, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Eliminate COPY FREEZE use of XLOG_HEAP2_VISIBLE
In-Reply-To: <E1v6xHh-000tLE-0m@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