pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Acquire properly session-level lock on new index in REINDEX CONC 2+ messages / 1 participants [nested] [flat]
* pgsql: Acquire properly session-level lock on new index in REINDEX CONC @ 2019-10-23 06:06 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 2+ messages in thread From: Michael Paquier @ 2019-10-23 06:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Acquire properly session-level lock on new index in REINDEX CONCURRENTLY In the first transaction run for REINDEX CONCURRENTLY, a thinko in the existing logic caused two session locks to be taken on the old index, causing the session lock on the newly-created index to be missed. This made possible concurrent DDL commands (like ALTER INDEX) on the new index while REINDEX CONCURRENTLY was processing from the point where the first internal transaction committed. This issue has been discovered while digging into another bug. Author: Michael Paquier Discussion: https://postgr.es/m/20191021074323.GB1869@paquier.xyz Backpatch-through: 12 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/5d3500da72611018f2280d6a31e58ccdb4b16152 Modified Files -------------- src/backend/commands/indexcmds.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Acquire properly session-level lock on new index in REINDEX CONC @ 2019-10-23 06:06 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 2+ messages in thread From: Michael Paquier @ 2019-10-23 06:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Acquire properly session-level lock on new index in REINDEX CONCURRENTLY In the first transaction run for REINDEX CONCURRENTLY, a thinko in the existing logic caused two session locks to be taken on the old index, causing the session lock on the newly-created index to be missed. This made possible concurrent DDL commands (like ALTER INDEX) on the new index while REINDEX CONCURRENTLY was processing from the point where the first internal transaction committed. This issue has been discovered while digging into another bug. Author: Michael Paquier Discussion: https://postgr.es/m/20191021074323.GB1869@paquier.xyz Backpatch-through: 12 Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7668d48477edc3bc8d6990ac3d3bd79e327e2719 Modified Files -------------- src/backend/commands/indexcmds.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-10-23 06:06 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-10-23 06:06 pgsql: Acquire properly session-level lock on new index in REINDEX CONC Michael Paquier <michael@paquier.xyz> 2019-10-23 06:06 pgsql: Acquire properly session-level lock on new index in REINDEX CONC Michael Paquier <michael@paquier.xyz>
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