Isn't partition drop code seriously at risk of deadlock?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Isn't partition drop code seriously at risk of deadlock?
Date: 2017-11-28 00:04:31
Message-ID: 1990.1511827471@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The complaint in bug #14927 that heap_drop_with_catalog is not bothering
to check for SearchSysCache lookup failure (in code evidently newly added
for the partition feature) seems to me to be only scratching the surface
of what's wrong with that code. In particular, I do not understand how
it can possibly be deadlock-free to be trying to grab AccessExclusiveLock
on a partition's parent table when we already have such a lock on the
partition. Which we do, or at least had better, long before we get to
heap_drop_with_catalog.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-11-28 00:11:56 Re: [HACKERS] Timeline ID in backup_label file
Previous Message Tom Lane 2017-11-27 23:16:06 Re: [HACKERS] More stats about skipped vacuums