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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Michael Paquier <michael@paquier.xyz>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-04-30T18:41:00Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2019-04-30 14:05:50 -0400, Tom Lane wrote:
>> Possibly we could run them in a TAP test that configures a cluster
>> with autovac disabled?

> Hm. Would it be sufficient to instead move them to a non-concurrent
> test group, and stick a BEGIN; LOCK pg_class, ....; COMMIT; around it?

Doubt it.  Maybe you could get away with it given that autovacuum and
autoanalyze only do non-transactional updates to pg_class, but that
seems like a pretty shaky assumption.

> This is a pretty finnicky area of the code, with obviously not enough
> test coverage.  I'm inclined to remove them from the back branches, and
> try to get them working in master?

I think trying to get this "working" is a v13 task now.  We've obviously
never tried to stress the case before, so you're neither fixing a
regression nor fixing a new-in-v12 issue.

			regards, tom lane



Commits

  1. Remove reindex_catalog test from test schedules.

  2. Remove RelationSetIndexList().

  3. Fix reindexing of pg_class indexes some more.

  4. Run catalog reindexing test from 3dbb317d32 serially, to avoid deadlocks.

  5. Fix potential assertion failure when reindexing a pg_class index.

  6. Fix several recently introduced issues around handling new relation forks.

  7. Avoid VACUUM FULL altogether in initdb.

  8. Introduce replication progress tracking infrastructure.

  9. initdb: remove unnecessary VACUUM FULL