Re: Deadlock in multiple CIC.

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Deadlock in multiple CIC.
Date: 2018-01-04 12:29:25
Message-ID: 20180104122925.h2fmxf3tnk666c6k@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

Alvaro Herrera wrote:

> Pushed to all affected branches, along with a somewhat lame
> isolationtester test for the condition (since we've already broken this
> twice and not noticed for long).

Buildfarm member okapi just failed this test in 9.4:

2018-01-04 02:44:43.481 PST [5a4e059a.3af1:6] ERROR: deadlock detected
2018-01-04 02:44:43.481 PST [5a4e059a.3af1:7] DETAIL: Process 15089 waits for ShareLock on virtual transaction 4/882; blocked by process 15090.
Process 15090 waits for ShareLock on virtual transaction 3/906; blocked by process 15089.
Process 15089:
CREATE INDEX CONCURRENTLY mcic_one_pkey ON mcic_one (id)
WHERE lck_shr(281457);

Process 15090:
CREATE INDEX CONCURRENTLY mcic_two_pkey ON mcic_two (id)
WHERE unlck();
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=okapi&dt=2018-01-04%2010%3A35%3A02

The interesting thing here is that the failure seems to be just like
before the patch: each session is waiting on a snapshot from the other
session. I suppose this must be some *other* snapshot, not the catalog
snapshot ...

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vik Fearing 2018-01-04 12:35:25 Re: pgbench - add \if support
Previous Message Michael Paquier 2018-01-04 12:24:14 Re: Enhance pg_stat_wal_receiver view to display connected host