Re: REINDEX INDEX results in a crash for an index of pg_class since 9.6 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: REINDEX INDEX results in a crash for an index of pg_class since 9.6
Date
Msg-id 26528.1556599820@sss.pgh.pa.us
Whole thread Raw
In response to Re: REINDEX INDEX results in a crash for an index of pg_class since 9.6  (Andres Freund <andres@anarazel.de>)
Responses Re: REINDEX INDEX results in a crash for an index of pg_class since9.6
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On April 29, 2019 9:37:33 PM PDT, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Seems like putting reindexes of pg_class into a test script that runs
>> in parallel with other DDL wasn't a hot idea.

> Saw that. Will try to reproduce (and if necessary either run separately or revert). But isn't that somewhat broken?
They'renot run in a transaction, so the locking shouldn't be deadlock prone. 

Hm?  REINDEX INDEX is deadlock-prone by definition, because it starts
by opening/locking the index and then it has to open/lock the index's
table.  Every other operation locks tables before their indexes.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: REINDEX INDEX results in a crash for an index of pg_class since 9.6
Next
From: Fabien COELHO
Date:
Subject: performance regression when filling in a table