Re: BUG #18363: Assert !ReindexIsProcessingIndex falsified with expression index over select from table
Вложения
В списке pgsql-bugs по дате отправления:
| От | Michael Paquier |
|---|---|
| Тема | Re: BUG #18363: Assert !ReindexIsProcessingIndex falsified with expression index over select from table |
| Дата | |
| Msg-id | ZeAaH7GQobcZync0@paquier.xyz обсуждение |
| Ответ на | Re: BUG #18363: Assert !ReindexIsProcessingIndex falsified with expression index over select from table (Alexander Lakhin <exclusion@gmail.com>) |
| Список | pgsql-bugs |
On Mon, Feb 26, 2024 at 09:00:01AM +0300, Alexander Lakhin wrote: > It looks like currentlyReindexedIndex == 0 in this case, so > ReindexIsProcessingIndex() doesn't guard against get_relation_info() -> > _bt_getrootheight() -> _bt_getbuf() -> ReadBuffer() -> ... -> mdread(). Fun. The concurrent case is actually able to work because it looks like the basic definition of the relation exists with its relfilenode. I was looking at that, and it seems to me that the point is not that the index is being reindexed; the point is that we want to prevent access to the index itself while it being built. And that's something that can happen for a reindex as much as a new index. It would be possible to paint an equivalent of SetReindexProcessing() in index_create() for index_build() where a trace of the index OID getting built is kept around, and it would be possible to trigger the same error as when doing a reindex. Hence, if we were to do that, the current ReindexIs*() routines maintaining the list of the indexes being built across transaction states are a bit misnamed, and the error messages would be partially incorrect. I am not sure if this is worth bothering beyond HEAD, or worth bothering at all, but seeing 940489b467 it looks like we do bother even for stable branches. -- Michael
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера