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
Дата
Msg-id 20180802200537.wenpzzov4p2j2onz@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: could not read block 0 in file : read only 0 of 8192 bytes whendoing nasty on immutable index function  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-bugs
Hi,

On 2018-08-02 13:00:16 -0700, Peter Geoghegan wrote:
> On Tue, Jul 31, 2018 at 9:00 PM, Andres Freund <andres@anarazel.de> wrote:
> > I don't think that's particularly relevant. We should always register an
> > invalidation before the relevant CommandCounterIncrement(), because that
> > is what makes catalog changes visible, and therefore requires
> > registering invalidations for coherency.
> 
> Fair enough. How about the attached revision?

Looks good to me, minus some optional nitpicks in the commit message
below.


> From 156be401c38f7884ed65641aa202b72b698f3e91 Mon Sep 17 00:00:00 2001
> From: Peter Geoghegan <pg@bowt.ie>
> Date: Tue, 31 Jul 2018 18:33:30 -0700
> Subject: [PATCH v2] Add table relcache invalidation to index builds.
> 
> It's necessary to make sure that owning tables have a relcache
> invalidation prior to advancing the command counter to make
> newly-entered catalog tuples for the index visible.  inval.c must be
> able to roll back the local caches in the event of transaction abort.
> There is only a problem when CREATE INDEX transactions abort, since
> there is a generic invalidation once we reach index_update_stats().

s/roll back/maintain consistency of/.  I'd also perhaps weaken the next
sentence, by adding a 'practically' or such, as a memory allocation
failure or such before the index build starts could cause this as well.

Greetings,

Andres Freund


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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: could not read block 0 in file : read only 0 of 8192 bytes whendoing nasty on immutable index function
Следующее
От: Dean Rasheed
Дата:
Сообщение: Re: Fwd: Problem with a "complex" upsert