Re: could not read block 0 in file : read only 0 of 8192 bytes whendoing nasty on immutable index function

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: could not read block 0 in file : read only 0 of 8192 bytes whendoing nasty on immutable index function
Дата
Msg-id CAH2-WzktOvCnKq29YF=vJduJZD1nCHBfkGQxOxCXESKG_eJi=g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: could not read block 0 in file : read only 0 of 8192 bytes whendoing nasty on immutable index function  (Andres Freund <andres@anarazel.de>)
Ответы Re: could not read block 0 in file : read only 0 of 8192 bytes whendoing nasty on immutable index function  (Andres Freund <andres@anarazel.de>)
Re: could not read block 0 in file : read only 0 of 8192 bytes whendoing nasty on immutable index function  (Andres Freund <andres@anarazel.de>)
Список pgsql-bugs
On Tue, Jul 31, 2018 at 7:02 PM, Andres Freund <andres@anarazel.de> wrote:
> Maybe expand a bit on this by saying that it's more likely "because
> plan_create_index_workers() triggers a relcache entry to be (re-)built,
> which previously did only happen in edge cases" or such?

Okay.

> Not a fan of this comment. It doesn't really explain that well why it's
> needed here, but then goes on to a relatively general explanation of why
> cache invalidation is necessary.  Why not just go for something like
> "register relcache invalidation on the indexes' heap relation, to
> maintain consistency of its index list"?

That seems much more generic to me!

The comment is supposed to convey that the stuff within
index_update_stats() isn't enough because of xact abort specifically.
SI invalidation is very much part of the index_update_stats() contract
already.

> I wonder if it wouldn't be more appropriately placed closer to the
> UpdateIndexRelation(), given that that's essentially what necessitates
> the relcache flush?

That makes sense. I'll do it that way.

-- 
Peter Geoghegan


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: could not read block 0 in file : read only 0 of 8192 bytes whendoing nasty on immutable index function
Следующее
От: Andres Freund
Дата:
Сообщение: Re: could not read block 0 in file : read only 0 of 8192 bytes whendoing nasty on immutable index function