pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix crash in REINDEX CONCURRENTLY due to DDLs run in index funct 3+ messages / 1 participants [nested] [flat]
* pgsql: Fix crash in REINDEX CONCURRENTLY due to DDLs run in index funct @ 2026-11-09 14:21 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 3+ messages in thread From: Noah Misch @ 2026-11-09 14:21 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix crash in REINDEX CONCURRENTLY due to DDLs run in index functions ReindexRelationConcurrently() keeps track of the OIDs of the relations it processes across all its phases, relying on session locks to protect them. A function called from an index predicate or expression could drop one of the indexes being processed by a REINDEX CONCURRENTLY, causing a crash during the swap phase due to a relation gone missing. The relations being reindexed, on which are taken the session locks, are now pinned during the build and validation phases so as no manipulation of their definition can happen in the session running a REINDEX CONCURRENTLY. Reported-by: Florent Saudel <fsaudel@protonmail.com> Author: Michael Paquier <michael@paquier.xyz> Backpatch-through: 14 Security: CVE-2026-116336 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/f24a08ec13eb4960c0e74114aa708e0aa9a0f76e Author: Michael Paquier <michael@paquier.xyz> Modified Files -------------- src/backend/commands/indexcmds.c | 62 ++++++++++++++++++++++++++++++ src/test/regress/expected/create_index.out | 27 +++++++++++++ src/test/regress/sql/create_index.sql | 21 ++++++++++ 3 files changed, 110 insertions(+) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix crash in REINDEX CONCURRENTLY due to DDLs run in index funct @ 2026-11-09 14:21 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 3+ messages in thread From: Noah Misch @ 2026-11-09 14:21 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix crash in REINDEX CONCURRENTLY due to DDLs run in index functions ReindexRelationConcurrently() keeps track of the OIDs of the relations it processes across all its phases, relying on session locks to protect them. A function called from an index predicate or expression could drop one of the indexes being processed by a REINDEX CONCURRENTLY, causing a crash during the swap phase due to a relation gone missing. The relations being reindexed, on which are taken the session locks, are now pinned during the build and validation phases so as no manipulation of their definition can happen in the session running a REINDEX CONCURRENTLY. Reported-by: Florent Saudel <fsaudel@protonmail.com> Author: Michael Paquier <michael@paquier.xyz> Backpatch-through: 14 Security: CVE-2026-116336 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f3eba64926fd7c43639801adbf8ff8051b82ba8a Author: Michael Paquier <michael@paquier.xyz> Modified Files -------------- src/backend/commands/indexcmds.c | 62 ++++++++++++++++++++++++++++++ src/test/regress/expected/create_index.out | 27 +++++++++++++ src/test/regress/sql/create_index.sql | 21 ++++++++++ 3 files changed, 110 insertions(+) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix crash in REINDEX CONCURRENTLY due to DDLs run in index funct @ 2026-11-09 14:21 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 3+ messages in thread From: Noah Misch @ 2026-11-09 14:21 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix crash in REINDEX CONCURRENTLY due to DDLs run in index functions ReindexRelationConcurrently() keeps track of the OIDs of the relations it processes across all its phases, relying on session locks to protect them. A function called from an index predicate or expression could drop one of the indexes being processed by a REINDEX CONCURRENTLY, causing a crash during the swap phase due to a relation gone missing. The relations being reindexed, on which are taken the session locks, are now pinned during the build and validation phases so as no manipulation of their definition can happen in the session running a REINDEX CONCURRENTLY. Reported-by: Florent Saudel <fsaudel@protonmail.com> Author: Michael Paquier <michael@paquier.xyz> Backpatch-through: 14 Security: CVE-2026-116336 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/061cc0ee6f017ba6b937c61a50c91a758b9a95a8 Author: Michael Paquier <michael@paquier.xyz> Modified Files -------------- src/backend/commands/indexcmds.c | 62 ++++++++++++++++++++++++++++++ src/test/regress/expected/create_index.out | 27 +++++++++++++ src/test/regress/sql/create_index.sql | 21 ++++++++++ 3 files changed, 110 insertions(+) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2026-11-09 14:21 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-11-09 14:21 pgsql: Fix crash in REINDEX CONCURRENTLY due to DDLs run in index funct Noah Misch <noah@leadboat.com> 2026-11-09 14:21 pgsql: Fix crash in REINDEX CONCURRENTLY due to DDLs run in index funct Noah Misch <noah@leadboat.com> 2026-11-09 14:21 pgsql: Fix crash in REINDEX CONCURRENTLY due to DDLs run in index funct Noah Misch <noah@leadboat.com>
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