postgresql/src/bin
Alexander Korotkov 298bdd3795 pg_dump: scope indAttNames per index in getIndexes()
getIndexes() declared indAttNames and nindAttNames in the outer
per-table loop, so the names collected for an index on expressions
were carried over to the next plain index in the same table.

This is an internal inconsistency rather than a user-facing bug.
dumpRelationStats_dumper() only walks indexes that have pg_statistic
rows, and ANALYZE only creates those for indexes with expressions,
so the second index in the affected pair is not visited and the stale
array is never consulted.

Fix by moving the two variables into the inner per-index loop so each
iteration starts with a clean slate.

Author: Maksim Melnikov <m.melnikov@postgrespro.ru>
Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com>
Discussion: https://postgr.es/m/be5fc489-587e-421f-bbb8-adb43cfd50f4@postgrespro.ru
Backpatch-through: 17
2026-06-03 13:01:26 +03:00
..
initdb Translation updates 2026-06-01 12:13:54 +02:00
pg_amcheck Translation updates 2026-06-01 12:13:54 +02:00
pg_archivecleanup Translation updates 2026-06-01 12:13:54 +02:00
pg_basebackup Translation updates 2026-06-01 12:13:54 +02:00
pg_checksums Translation updates 2026-06-01 12:13:54 +02:00
pg_combinebackup Translation updates 2026-06-01 12:13:54 +02:00
pg_config Translation updates 2026-06-01 12:13:54 +02:00
pg_controldata Translation updates 2026-06-01 12:13:54 +02:00
pg_ctl Translation updates 2026-06-01 12:13:54 +02:00
pg_dump pg_dump: scope indAttNames per index in getIndexes() 2026-06-03 13:01:26 +03:00
pg_resetwal Translation updates 2026-06-01 12:13:54 +02:00
pg_rewind Translation updates 2026-06-01 12:13:54 +02:00
pg_test_fsync Translation updates 2026-06-01 12:13:54 +02:00
pg_test_timing Translation updates 2026-06-01 12:13:54 +02:00
pg_upgrade Translation updates 2026-06-01 12:13:54 +02:00
pg_verifybackup Translation updates 2026-06-01 12:13:54 +02:00
pg_waldump Translation updates 2026-06-01 12:13:54 +02:00
pg_walsummary Translation updates 2026-06-01 12:13:54 +02:00
pgbench pgbench: fix verbose error message corruption with multiple threads 2026-05-14 12:30:34 +09:00
pgevent Update copyright for 2026 2026-01-01 13:24:10 -05:00
psql psql: Fix issues with deferred errors in pipelines 2026-06-03 08:58:26 +09:00
scripts vacuumdb: Fix --analyze-in-stages skipping partitioned tables 2026-06-03 16:53:16 +09:00
Makefile Update copyright for 2026 2026-01-01 13:24:10 -05:00
meson.build Update copyright for 2026 2026-01-01 13:24:10 -05:00