pgsql: Eliminate COPY FREEZE use of XLOG_HEAP2_VISIBLE

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Eliminate COPY FREEZE use of XLOG_HEAP2_VISIBLE
Date: 2025-10-09 20:30:45
Message-ID: E1v6xHh-000tLE-0m@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)gmail(dot)com>
Reviewed-by: Andres Freund <andres(at)anarazel(dot)de>
Reviewed-by: Robert Haas <robertmhaas(at)gmail(dot)com>
Reviewed-by: Kirill Reshke <reshkekirill(at)gmail(dot)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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2025-10-09 22:20:33 pgsql: test_bitmapset: Improve random function
Previous Message David Rowley 2025-10-09 20:25:52 pgsql: Cleanup VACUUM option processing error messages