Re: Can concurrent create index concurrently block each other?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Can concurrent create index concurrently block each other?
Дата
Msg-id 2115849.1697399996@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Can concurrent create index concurrently block each other?  (Konstantin Knizhnik <knizhnik@garret.ru>)
Ответы Re: Can concurrent create index concurrently block each other?  (Konstantin Knizhnik <knizhnik@garret.ru>)
Список pgsql-hackers
Konstantin Knizhnik <knizhnik@garret.ru> writes:
> One our customer complains that he spawned two `create index 
> concurrently` for two different tables and both stuck in"waiting for old 
> snapshots".
> I wonder if two CIC can really block each other in `WaitForOlderSnapshots`?

Since v14, we won't wait for another CIC unless it is processing a
partial or expressional index.  (According to the comments for
WaitForOlderSnapshots, anyway.)  What PG version is this, and what
kind of indexes are being rebuilt?

In any case, if they were blocking each other that would be reported
as a deadlock, since they'd use VirtualXactLock() which relies on
the heavyweight lock manager.  What seems more likely is that your
customer had some other old transaction sitting idle and blocking both
of them.  Looking into pg_locks would provide more definitive evidence
about what they are waiting for.

            regards, tom lane



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

Предыдущее
От: Avinash Vallarapu
Дата:
Сообщение: Re: Can concurrent create index concurrently block each other?
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Optimizing nbtree ScalarArrayOp execution, allowing multi-column ordered scans, skip scan