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

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-05-04T13:06:37Z
Lists: pgsql-hackers
On Thu, May 02, 2019 at 07:18:19PM -0400, Tom Lane wrote:
> I did manually verify that all branches get through "reindex table
> pg_class" and "reindex index pg_class_oid_index" under
> CLOBBER_CACHE_ALWAYS, as well as a normal-mode check-world.  But CCA
> world runs seem like a good idea.

(catching up a bit..)

sidewinder is still pissed of as of HEAD, pointing visibly to f912d7d
as the root cause:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=sidewinder&dt=2019-05-03%2021%3A45%3A00

 REINDEX TABLE pg_class; -- mapped, non-shared, critical
+ERROR:  deadlock detected
+DETAIL:  Process 28266 waits for ShareLock on transaction 2988;
 blocked by process 20650.
+Process 20650 waits for RowExclusiveLock on relation 1259 of
 database 16387; blocked by process 28266.
+HINT:  See server log for query details.

I don't think that's sane just before the upcoming release..
--
Michael

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