Re: Concurrent deadlock scenario with DROP INDEX on partitioned index

Jimmy Yih <jyih@vmware.com>

From: Jimmy Yih <jyih@vmware.com>
To: Zhihong Yu <zyu@yugabyte.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, Gaurab Dey <gaurabd@vmware.com>
Date: 2022-03-16T20:43:12Z
Lists: pgsql-hackers

Attachments

Zhihong Yu <zyu@yugabyte.com> wrote:
> Hi,
> For RangeVarCallbackForDropRelation():
>
> +               LockRelationOid(indexRelationOid, heap_lockmode);
>
> Since the above is called for both if and else blocks, it can be lifted outside.

Thanks for the feedback.  Attached new v3 patch with feedback addressed.

--
Jimmy Yih (VMware)
Gaurab Dey (VMware)

Commits

  1. Fix risk of deadlock failure while dropping a partitioned index.