pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Luca Ferrari <fluca1978@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: could not read block 0 in file : read only 0 of 8192 bytes when doing nasty on immutable index function
Date: Thu, 2 Aug 2018 13:05:37 -0700
Message-ID: <20180802200537.wenpzzov4p2j2onz@alap3.anarazel.de> (raw)
In-Reply-To: <CAH2-Wzn_4+FMDkdcy=iQqW28Y2aeCmKeZo947Wed4t0o4oLBxQ@mail.gmail.com>
References: <CAKoxK+5bCn5d0R5v6j8SQQtUobu9R+m1xTTat8zsD1jH3izeDA@mail.gmail.com>
	<CAKoxK+7gQjxWYZiUm5q9M9dxd1mBgi=1rDwN0UNZbkXvB37Eiw@mail.gmail.com>
	<20180628150209.n2qch5jtn3vt2xaa@alap3.anarazel.de>
	<CAH2-Wzn1DDZ6HSDwOpD2b964mqpPDqsE1nAfbHr+TU5cBo219A@mail.gmail.com>
	<20180709183201.zn53uwiwqozhettk@alap3.anarazel.de>
	<CAH2-WzmgqMxL5X0saGkAGYE2AU3xYgrtoAUmX_fwrEP1SaBzAg@mail.gmail.com>
	<20180801020211.fqrubprbstrdcg6p@alap3.anarazel.de>
	<CAH2-WzktOvCnKq29YF=vJduJZD1nCHBfkGQxOxCXESKG_eJi=g@mail.gmail.com>
	<20180801040057.yepw7fqlfrj4mvrx@alap3.anarazel.de>
	<CAH2-Wzn_4+FMDkdcy=iQqW28Y2aeCmKeZo947Wed4t0o4oLBxQ@mail.gmail.com>

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




view thread (20+ messages)

Message-ID: <20180802200537.wenpzzov4p2j2onz@alap3.anarazel.de>
Permalink:  ../20180802200537.wenpzzov4p2j2onz@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20180802200537.wenpzzov4p2j2onz@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: andres@anarazel.de, pg@bowt.ie, fluca1978@gmail.com, pgsql-general@postgresql.org
  Subject: Re: could not read block 0 in file : read only 0 of 8192 bytes when doing nasty on immutable index function
  In-Reply-To: <20180802200537.wenpzzov4p2j2onz@alap3.anarazel.de>
  References: <CAKoxK+5bCn5d0R5v6j8SQQtUobu9R+m1xTTat8zsD1jH3izeDA@mail.gmail.com> <CAKoxK+7gQjxWYZiUm5q9M9dxd1mBgi=1rDwN0UNZbkXvB37Eiw@mail.gmail.com> <20180628150209.n2qch5jtn3vt2xaa@alap3.anarazel.de> <CAH2-Wzn1DDZ6HSDwOpD2b964mqpPDqsE1nAfbHr+TU5cBo219A@mail.gmail.com> <20180709183201.zn53uwiwqozhettk@alap3.anarazel.de> <CAH2-WzmgqMxL5X0saGkAGYE2AU3xYgrtoAUmX_fwrEP1SaBzAg@mail.gmail.com> <20180801020211.fqrubprbstrdcg6p@alap3.anarazel.de> <CAH2-WzktOvCnKq29YF=vJduJZD1nCHBfkGQxOxCXESKG_eJi=g@mail.gmail.com> <20180801040057.yepw7fqlfrj4mvrx@alap3.anarazel.de> <CAH2-Wzn_4+FMDkdcy=iQqW28Y2aeCmKeZo947Wed4t0o4oLBxQ@mail.gmail.com> <20180802200537.wenpzzov4p2j2onz@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox