pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Concurrent REPACK: Clear out dropped-column values from all tupl 2+ messages / 1 participants [nested] [flat]
* pgsql: Concurrent REPACK: Clear out dropped-column values from all tupl @ 2026-10-07 08:57 Álvaro Herrera <alvherre@kurilemu.de> 0 siblings, 0 replies; 2+ messages in thread From: Álvaro Herrera @ 2026-10-07 08:57 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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@gmail.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(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Concurrent REPACK: Clear out dropped-column values from all tupl @ 2026-10-07 08:57 Álvaro Herrera <alvherre@kurilemu.de> 0 siblings, 0 replies; 2+ messages in thread From: Álvaro Herrera @ 2026-10-07 08:57 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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@gmail.com> Backpatch-through: 19 Discussion: https://postgr.es/m/CAJgoLkK2UBzB1J9buCsSUbjf7bOqz-o_0=CeiTruU789BhBw-Q@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/e40b509c08f34e245bfab4124e24297ddaf4d535 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(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-10-07 08:57 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-10-07 08:57 pgsql: Concurrent REPACK: Clear out dropped-column values from all tupl Álvaro Herrera <alvherre@kurilemu.de> 2026-10-07 08:57 pgsql: Concurrent REPACK: Clear out dropped-column values from all tupl Álvaro Herrera <alvherre@kurilemu.de>
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