pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Clear out values from dropped columns during REPACK (CONCURRENTL 2+ messages / 1 participants [nested] [flat]
* pgsql: Clear out values from dropped columns during REPACK (CONCURRENTL @ 2026-10-03 11:07 Álvaro Herrera <alvherre@kurilemu.de> 0 siblings, 0 replies; 2+ messages in thread From: Álvaro Herrera @ 2026-10-03 11:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Clear out values from dropped columns during REPACK (CONCURRENTLY) When repacking a table concurrently, some border conditions can cause a concurrent update to propagate the original old tuple to the transient table (such as a trigger that returns OLD). That's essentially just wasted space, which REPACK is there to remove. Prevent that by setting the isnull flag to true for any column cataloged as dropped in tuples being "replayed" as concurrent updates. Reported-by: Radim Marek <radim@boringsql.com> Reviewed-by: Antonin Houska <ah@cybertec.at> Backpatch: 19 Discussion: https://postgr.es/m/CAJgoLkK2UBzB1J9buCsSUbjf7bOqz-o_0=CeiTruU789BhBw-Q@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/e5d25959cf8761c7dbdd7cfbb91338e94a40e8e2 Modified Files -------------- src/backend/commands/repack.c | 36 +++++++---- .../injection_points/expected/repack_dropped.out | 47 ++++++++++++++ src/test/modules/injection_points/meson.build | 1 + .../injection_points/specs/repack_dropped.spec | 71 ++++++++++++++++++++++ 4 files changed, 144 insertions(+), 11 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Clear out values from dropped columns during REPACK (CONCURRENTL @ 2026-10-03 11:07 Álvaro Herrera <alvherre@kurilemu.de> 0 siblings, 0 replies; 2+ messages in thread From: Álvaro Herrera @ 2026-10-03 11:07 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Clear out values from dropped columns during REPACK (CONCURRENTLY) When repacking a table concurrently, some border conditions can cause a concurrent update to propagate the original old tuple to the transient table (such as a trigger that returns OLD). That's essentially just wasted space, which REPACK is there to remove. Prevent that by setting the isnull flag to true for any column cataloged as dropped in tuples being "replayed" as concurrent updates. Reported-by: Radim Marek <radim@boringsql.com> Reviewed-by: Antonin Houska <ah@cybertec.at> Backpatch: 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/10c67bcb2da6acb16ce77ff1a498532b26538dcc Modified Files -------------- src/backend/commands/repack.c | 36 +++++++---- .../injection_points/expected/repack_dropped.out | 47 ++++++++++++++ src/test/modules/injection_points/meson.build | 1 + .../injection_points/specs/repack_dropped.spec | 71 ++++++++++++++++++++++ 4 files changed, 144 insertions(+), 11 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-10-03 11:07 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-10-03 11:07 pgsql: Clear out values from dropped columns during REPACK (CONCURRENTL Álvaro Herrera <alvherre@kurilemu.de> 2026-10-03 11:07 pgsql: Clear out values from dropped columns during REPACK (CONCURRENTL Á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