pgsql: Acquire properly session-level lock on new index in REINDEX CONC

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: Acquire properly session-level lock on new index in REINDEX CONC
Дата
Msg-id E1iN9mT-0005sr-4i@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Remove libpq-dist.rc
Следующее
От: Bruce Momjian
Дата:
Сообщение: pgsql: pg_upgrade: adjust error output to use new database list format