Re: pgsql: Fix potential assertion failure when reindexing a pg_class index

From: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Fix potential assertion failure when reindexing a pg_class index
Date: 2019-04-30 12:24:56
Message-ID: 2c54a7e6-dddf-861d-4d76-e8e4681da0c9@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers


On 4/29/19 11:04 PM, Andres Freund wrote:
> Fix potential assertion failure when reindexing a pg_class index.
>

There seem to be a number of regression test failures involving deadlock
resulting from this. e.g. on prion:

2019-04-30 03:20:12.772 UTC [15476:388] pg_regress/create_view LOG: statement: alter table tt14t alter column f4 type integer using f4::integer;
2019-04-30 03:20:12.776 UTC [15479:450] pg_regress/create_index LOG: statement: REINDEX TABLE pg_class;
2019-04-30 03:20:13.777 UTC [15476:389] pg_regress/create_view LOG: process 15476 detected deadlock while waiting for AccessShareLock on relation 2662 of database 16384 after 1000.109 ms
2019-04-30 03:20:13.777 UTC [15476:390] pg_regress/create_view DETAIL: Process holding the lock: 15479. Wait queue: .
2019-04-30 03:20:13.777 UTC [15476:391] pg_regress/create_view STATEMENT: alter table tt14t alter column f4 type integer using f4::integer;
2019-04-30 03:20:13.777 UTC [15476:392] pg_regress/create_view ERROR: deadlock detected
2019-04-30 03:20:13.777 UTC [15476:393] pg_regress/create_view DETAIL: Process 15476 waits for AccessShareLock on relation 2662 of database 16384; blocked by process 15479.
Process 15479 waits for ShareLock on transaction 2887; blocked by process 15476.
Process 15476: alter table tt14t alter column f4 type integer using f4::integer;
Process 15479: REINDEX TABLE pg_class;

cheers

andrew

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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2019-04-30 13:28:30 Re: pgsql: Fix potential assertion failure when reindexing a pg_class index
Previous Message Andres Freund 2019-04-30 03:04:15 pgsql: Fix potential assertion failure when reindexing a pg_class index