pgsql: Better fix for deadlock hazard in CREATE INDEX CONCURRENTLY.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Better fix for deadlock hazard in CREATE INDEX CONCURRENTLY.
Дата
Msg-id E1f8pch-0004pt-IR@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Better fix for deadlock hazard in CREATE INDEX CONCURRENTLY.

Commit 54eff5311 did not account for the possibility that we'd have
a transaction snapshot due to default_transaction_isolation being
set high enough to require one.  The transaction snapshot is enough
to hold back our advertised xmin and thus risk deadlock anyway.
The only way to get rid of that snap is to start a new transaction,
so let's do that instead.  Also throw in an assert checking that we
really have gotten to a state where no xmin is being advertised.

Back-patch to 9.4, like the previous commit.

Discussion: https://postgr.es/m/CAMkU=1ztk3TpQdcUNbxq93pc80FrXUjpDWLGMeVBDx71GHNwZQ@mail.gmail.com

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7490ce725edd5b46f14fa8a449a97c9487c1d143

Modified Files
--------------
src/backend/commands/indexcmds.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Improve docs for the new INCLUDE directive in CREATE/ALTERTABLE
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi