Re: REINDEX INDEX results in a crash for an index of pg_class since 9.6
От | Tom Lane |
---|---|
Тема | Re: REINDEX INDEX results in a crash for an index of pg_class since 9.6 |
Дата | |
Msg-id | 29546.1556647550@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: REINDEX INDEX results in a crash for an index of pg_class since9.6 (Andres Freund <andres@anarazel.de>) |
Ответы |
Re: REINDEX INDEX results in a crash for an index of pg_class since9.6
|
Список | pgsql-hackers |
Andres Freund <andres@anarazel.de> writes: > It's the lock-upgrade problem I theorized about > upthread. ReindexIndex(), via RangeVarCallbackForReindexIndex(), takes a > ShareLock on pg_class, and then goes on to upgrade to RowExclusiveLock > in RelationSetNewRelfilenode(). But at that time another session > obviously can already have the ShareLock and would also want to upgrade. Hmm. Note that this is totally independent of the deadlock mechanism I reported in my last message on this thread. I also wonder whether clobber-cache testing would expose cases we haven't seen that trace to the additional catalog accesses caused by cache reloads. > I'm not sure it's worth fixing this. I am not sure it's even *possible* to fix all these cases. Even if we could, it's out of scope for v12 let alone the back branches. I think the only practical solution is to remove those reindex tests. Even if we ran them in a script with no concurrent scripts, there'd be risk of failures against autovacuum, I'm afraid. Not often, but often enough to be annoying. Possibly we could run them in a TAP test that configures a cluster with autovac disabled? regards, tom lane
В списке pgsql-hackers по дате отправления: