Re: Deadlock in multiple CIC. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Deadlock in multiple CIC.
Date
Msg-id 6295.1523889076@sss.pgh.pa.us
Whole thread Raw
In response to Re: Deadlock in multiple CIC.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Deadlock in multiple CIC.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> As an investigative measure, I propose that we insert
>     Assert(MyPgXact->xmin == InvalidTransactionId);
> into 9.4's DefineIndex, just after its InvalidateCatalogSnapshot call.

Well, isn't this interesting:

TRAP: FailedAssertion("!(MyPgXact->xmin == ((TransactionId) 0))", File: "indexcmds.c", Line: 777)
2018-04-16 02:41:25.814 PDT [5ad46fbd.5412:2] LOG:  server process (PID 21777) was terminated by signal 6: Aborted
2018-04-16 02:41:25.814 PDT [5ad46fbd.5412:3] DETAIL:  Failed process was running: CREATE INDEX CONCURRENTLY
concur_index1ON concur_heap(f2,f1); 

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=okapi&dt=2018-04-16%2009%3A35%3A02

So we can now refine the problem statement to "SnapshotResetXmin isn't
doing what it's supposed to".  No idea why yet.  9.4 is using a simple
RegisteredSnapshots counter which 9.5 has replaced with a pairing heap,
so you'd think the newer code would be *more* likely to have bugs...

            regards, tom lane


pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: very slow queries when max_parallel_workers_per_gather is higherthan zero
Next
From: David Fetter
Date:
Subject: Re: Proposal: Adding json logging