public inbox for [email protected]help / color / mirror / Atom feed
pgsql: pg_dump: scope indAttNames per index in getIndexes() 4+ messages / 3 participants [nested] [flat]
* pgsql: pg_dump: scope indAttNames per index in getIndexes() @ 2026-06-03 10:01 Alexander Korotkov <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Alexander Korotkov @ 2026-06-03 10:01 UTC (permalink / raw) To: [email protected] 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 <[email protected]> Reviewed-by: Alexander Korotkov <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 17 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/298bdd379552148f6043b4595374a7a6fbdd13c3 Modified Files -------------- src/bin/pg_dump/pg_dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: pg_dump: scope indAttNames per index in getIndexes() @ 2026-06-03 10:01 Alexander Korotkov <[email protected]> 0 siblings, 0 replies; 4+ messages in thread From: Alexander Korotkov @ 2026-06-03 10:01 UTC (permalink / raw) To: [email protected] 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 <[email protected]> Reviewed-by: Alexander Korotkov <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 17 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/94c02de89c2632eeb870899c89224ca1a23d2ae1 Modified Files -------------- src/bin/pg_dump/pg_dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pgsql: pg_dump: scope indAttNames per index in getIndexes() @ 2026-06-04 22:54 Michael Paquier <[email protected]> parent: Alexander Korotkov <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Michael Paquier @ 2026-06-04 22:54 UTC (permalink / raw) To: Alexander Korotkov <[email protected]>; +Cc: [email protected] Hi Alexander, On Wed, Jun 03, 2026 at 10:01:44AM +0000, Alexander Korotkov wrote: > pg_dump: scope indAttNames per index in getIndexes() > > Author: Maksim Melnikov <[email protected]> > Reviewed-by: Alexander Korotkov <[email protected]> > Discussion: https://postgr.es/m/[email protected] > Backpatch-through: 17 Regarding this commit, we have as of today: $ git branch --contains 94c02de89c26 + REL_18_STABLE $ git branch --contains 298bdd379552 + master And there is nothing on REL_17_STABLE. Am I missing something or isn't this just a typo in the Backpatch-through tag? -- Michael Attachments: [application/pgp-signature] signature.asc (833B, 2-signature.asc) download ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pgsql: pg_dump: scope indAttNames per index in getIndexes() @ 2026-06-05 05:47 Alexander Korotkov <[email protected]> parent: Michael Paquier <[email protected]> 0 siblings, 0 replies; 4+ messages in thread From: Alexander Korotkov @ 2026-06-05 05:47 UTC (permalink / raw) To: Michael Paquier <[email protected]>; +Cc: Alexander Korotkov <[email protected]>; [email protected] Hi, Michael! On Fri, Jun 5, 2026 at 1:54 AM Michael Paquier <[email protected]> wrote: > On Wed, Jun 03, 2026 at 10:01:44AM +0000, Alexander Korotkov wrote: > > pg_dump: scope indAttNames per index in getIndexes() > > > > Author: Maksim Melnikov <[email protected]> > > Reviewed-by: Alexander Korotkov <[email protected]> > > Discussion: https://postgr.es/m/[email protected] > > Backpatch-through: 17 > > Regarding this commit, we have as of today: > $ git branch --contains 94c02de89c26 > + REL_18_STABLE > $ git branch --contains 298bdd379552 > + master > > And there is nothing on REL_17_STABLE. Am I missing something or > isn't this just a typo in the Backpatch-through tag? Thank you for pointing. I've rechecked. The code that this commit is intended to fix is introduced by 40e27d04b4f6, which appears first in PG18. So, yes, it's a typo in the backpatch tag. Sorry for that. ------ Regards, Alexander Korotkov Supabase ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2026-06-05 05:47 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-06-03 10:01 pgsql: pg_dump: scope indAttNames per index in getIndexes() Alexander Korotkov <[email protected]> 2026-06-04 22:54 ` Michael Paquier <[email protected]> 2026-06-05 05:47 ` Alexander Korotkov <[email protected]> 2026-06-03 10:01 pgsql: pg_dump: scope indAttNames per index in getIndexes() Alexander Korotkov <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox