Re: REINDEX INDEX results in a crash for an index of pg_class since 9.6

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Masao Fujii <FujiiMasaomasao(dot)fujii(at)gmail(dot)com>
Subject: Re: REINDEX INDEX results in a crash for an index of pg_class since 9.6
Date: 2019-04-23 23:35:40
Message-ID: 20190423233540.GB1878@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 23, 2019 at 04:47:19PM -0400, Tom Lane wrote:
> regression=# reindex index pg_class_relname_nsp_index;
> REINDEX
> regression=# reindex index pg_class_oid_index;
> REINDEX
> regression=# reindex index pg_class_tblspc_relfilenode_index;
> REINDEX
> regression=# reindex table pg_class;
> REINDEX
> regression=# reindex index pg_class_tblspc_relfilenode_index;
> REINDEX
>
> Is there some precondition you're not mentioning?

Hm. In my own init scripts, I create a new database just after
starting the instance. That seems to help in reproducing the
failure, because each time I create a new database, connect to it and
reindex then I can see the crash. If I do a reindex of pg_class
first, I don't see a crash of some rebuilds already happened, but if I
do directly a reindex of one of the indexes first, then the failure is
plain. If I also add some regression tests, say in create_index.sql
to stress a reindex of pg_class and its indexes, the crash also shows
up. If I apply my previous patch to make CatalogIndexInsert() not do
an insert on a catalog index being rebuilt, then things turn to be
fine.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2019-04-23 23:42:10 Re: Runtime pruning problem
Previous Message David Rowley 2019-04-23 23:02:41 Re: pg_dump is broken for partition tablespaces