Re: remove spurious CREATE INDEX CONCURRENTLY wait

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: remove spurious CREATE INDEX CONCURRENTLY wait
Дата
Msg-id 20201117002341.GA23972@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: remove spurious CREATE INDEX CONCURRENTLY wait  (Dmitry Dolgov <9erthalion6@gmail.com>)
Ответы Re: remove spurious CREATE INDEX CONCURRENTLY wait
Re: remove spurious CREATE INDEX CONCURRENTLY wait
Список pgsql-hackers
I am really unsure about the REINDEX CONCURRENTLY part of this, for two
reasons:

1. It is not as good when reindexing multiple indexes, because we can
only apply the flag if *all* indexes are "safe".  Any unsafe index means
we step down from it for the whole thing.  This is probably not worth
worrying much about, but still.

2. In some of the waiting transactions, we actually do more things than
what we do in CREATE INDEX CONCURRENTLY transactions --- some catalog
updates, but we also do the whole index validation phase.  Is that OK?
It's not as clear to me that it is safe to set the flag in all those
places.

I moved the comments to the new function and made it inline.  I also
changed the way we determine how the function is safe; there's no reason
to build an IndexInfo if we can simply look at rel->rd_indexprs and
rel->indpred.

I've been wondering if it would be sane/safe to do the WaitForFoo stuff
outside of any transaction.

I'll have a look again tomorrow.

Вложения

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

Предыдущее
От: Greg Nancarrow
Дата:
Сообщение: Crash in virtual file descriptor FDDEBUG code
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: remove spurious CREATE INDEX CONCURRENTLY wait