| From: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Concurrent REPACK: Clear out dropped-column values from all tupl |
| Date: | 2026-10-07 08:57:50 |
| Message-ID: | E1xENTC-00000000fRa-18Fw@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Concurrent REPACK: Clear out dropped-column values from all tuples
Commit e5d25959cf87 made REPACK null-out values of dropped columns in
the NEW tuple of an UPDATE. However, a concurrent INSERT can carry one
too, for example when a trigger returns a copy of an existing row.
REPACK (CONCURRENTLY) then kept the values for such columns, which is
wasteful -- or worse, failed with "row is too big" if the new heap
happens not to have a TOAST table.
Move their clearing from prepare_concurrent_update() to restore_tuple()
so that it affects all tuples processed, not just the UPDATE ones.
Author: Shihao Zhong <zhong950419(at)gmail(dot)com>
Backpatch-through: 19
Discussion: https://postgr.es/m/CAJgoLkK2UBzB1J9buCsSUbjf7bOqz-o_0=CeiTruU789BhBw-Q@mail.gmail.com
Branch
------
REL_19_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/d65fa2e72636920aa0f75518520e4aeb130841b0
Modified Files
--------------
src/backend/commands/repack.c | 33 +++++++++++-----------
.../injection_points/expected/repack_dropped.out | 8 ++++--
.../injection_points/specs/repack_dropped.spec | 16 ++++++++++-
3 files changed, 37 insertions(+), 20 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2026-10-07 10:12:39 | pgsql: Fix remote_apply waits with wal_receiver_status_interval set to |
| Previous Message | David Rowley | 2026-10-07 08:54:39 | Re: pgsql: Optimize tuple deformation |