Re: remove spurious CREATE INDEX CONCURRENTLY wait
Вложения
В списке pgsql-hackers по дате отправления:
| От | Alvaro Herrera |
|---|---|
| Тема | Re: remove spurious CREATE INDEX CONCURRENTLY wait |
| Дата | |
| Msg-id | 20201127165307.GA13721@alvherre.pgsql обсуждение исходный текст |
| Ответ на | Re: remove spurious CREATE INDEX CONCURRENTLY wait (Alvaro Herrera <alvherre@alvh.no-ip.org>) |
| Ответы |
Re: remove spurious CREATE INDEX CONCURRENTLY wait
|
| Список | pgsql-hackers |
Actually, I noticed two things. The first of them, addressed in this new version of the patch, is that REINDEX CONCURRENTLY is doing a lot of repetitive work by reopening each index and table in the build/validate loops, so that they can report progress. This is easy to remedy by adding a couple more members to the new struct (which I also renamed to ReindexIndexInfo), for tableId and amId. The code seems a bit simpler this way. The other thing is that ReindexRelationConcurrenty seems to always be called with the relations already locked by RangeVarGetRelidExtended. So claiming to acquire locks on the relations over and over is pointless. (I only noticed this because there was an obvious deadlock hazard in one of the loops, that locked index before table.) I think we should reduce all those to NoLock. My patch does not do that.
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера