postgresql/src
Álvaro Herrera 5ee9d7c299
REPACK CONCURRENTLY: Initialize the range table more honestly
We were skipping a bunch of things that are mostly unnecessary for
REPACK.  However, one thing that seems would be better to pass closer to
truth, is the updatedCols bitmapset in the range table entry for the
repacked table.  Cons up an RTE and install it into the EState.

This only has an effect on btree indexes, because certain operations are
optimized in the case of unchanged columns; and even then, correctnesss
is not being compromised.

The values we pass after this commit are not fully trustworthy either,
because we simply say "all columns were updated" for all insert/updates,
regardless of whether their values were actually modified or not.
However, this way we err to the side of caution rather than to the
opposite direction as we were originally doing.  This could be refined
in the future, but there's a trade-off: determining whether the column
was in fact updated could be expensive.

Author: Antonin Houska <ah@cybertec.at>
Reviewed-by: Ewan Young <kdbase.hack@gmail.com>
Backpatch-through: 19
Discussion: https://postgr.es/m/18222.1782126731@localhost
2026-07-03 20:04:48 +02:00
..
backend REPACK CONCURRENTLY: Initialize the range table more honestly 2026-07-03 20:04:48 +02:00
bin psql: Fix \df tab completion for procedures 2026-07-03 13:48:59 +09:00
common Fix mismatched deallocation functions 2026-07-01 13:50:08 +02:00
fe_utils Fix mismatched deallocation functions 2026-07-01 13:50:08 +02:00
include Prevent access to other sessions' empty temp tables 2026-07-03 18:02:14 +03:00
interfaces Fix tracing of BackendKeyData and CancelRequest 2026-07-03 14:57:35 +03:00
makefiles Add CONCURRENTLY option to REPACK 2026-04-06 21:55:08 +02:00
pl plpython: Fix NULL pointer dereferences for broken sequence and mapping objects 2026-06-29 11:38:39 +09:00
port Use C11 alignas instead of pg_attribute_aligned 2026-07-01 08:36:43 +02:00
template Switch the semaphore API on Solaris to unnamed POSIX. 2026-03-14 14:10:32 -04:00
test Resolve unknown-type literals in GRAPH_TABLE COLUMNS 2026-07-03 17:10:42 +02:00
timezone Fix macro-redefinition warning introduced by aeb07c55f. 2026-07-01 13:44:45 -04:00
tools Allow logical replication conflicts to be logged to a table. 2026-07-02 08:26:07 +05:30
tutorial Pre-beta mechanical code beautification, step 1: run pgindent. 2026-05-13 10:34:17 -04:00
.gitignore
DEVELOPERS
Makefile Add CONCURRENTLY option to REPACK 2026-04-06 21:55:08 +02:00
Makefile.global.in Update Unicode data to CLDR 48.2 2026-04-13 11:13:36 +02:00
Makefile.shlib Restore AIX support. 2026-02-23 13:34:22 -05:00
meson.build Update copyright for 2026 2026-01-01 13:24:10 -05:00
nls-global.mk Fix update-po for the PGXS case 2025-10-16 20:21:05 +02:00