| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | Peter Geoghegan <pg(at)bowt(dot)ie> |
| Cc: | Luca Ferrari <fluca1978(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: could not read block 0 in file : read only 0 of 8192 bytes when doing nasty on immutable index function |
| Date: | 2018-08-02 20:05:37 |
| Message-ID: | 20180802200537.wenpzzov4p2j2onz@alap3.anarazel.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs pgsql-general |
Hi,
On 2018-08-02 13:00:16 -0700, Peter Geoghegan wrote:
> On Tue, Jul 31, 2018 at 9:00 PM, Andres Freund <andres(at)anarazel(dot)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(at)bowt(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dean Rasheed | 2018-08-03 06:52:38 | Re: Fwd: Problem with a "complex" upsert |
| Previous Message | Peter Geoghegan | 2018-08-02 20:00:16 | Re: could not read block 0 in file : read only 0 of 8192 bytes when doing nasty on immutable index function |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Richard Schmidt | 2018-08-02 23:48:53 | FW: Pg_rewind cannot load history wal |
| Previous Message | Peter Geoghegan | 2018-08-02 20:00:16 | Re: could not read block 0 in file : read only 0 of 8192 bytes when doing nasty on immutable index function |