Re: 024_add_drop_pub.pl might fail due to deadlock - Mailing list pgsql-hackers

From Ajin Cherian
Subject Re: 024_add_drop_pub.pl might fail due to deadlock
Date
Msg-id CAFPTHDYu38w1EYU_MD+29-mdXpV2F9gCzwBYAxuKVFm6auLYBA@mail.gmail.com
Whole thread Raw
In response to Re: 024_add_drop_pub.pl might fail due to deadlock  (Ajin Cherian <itsajin@gmail.com>)
List pgsql-hackers
> locked. I've made a new version of the patch on PG_15.

I've made a similar fix on HEAD just so that the code is now
consistent. I don't think the similar problem (deadlock between two
different subscriptions trying to drop tracking origin)  occurs on
HEAD with my previous patch, as the way origins are dropped are
different on HEAD. On HEAD, while dropping origin, a RowExclusiveLock
lock is taken on ReplicationOriginRelationId and then an
AccessExclusiveLock is taken on the particular origin. Since the
particular origin will be different on different subscriptions, the
similar deadlock will not happen. But just to keep code consistent, I
have made a similar fix.

regards,
Ajin Cherian
Fujitsu Australia

Attachment

pgsql-hackers by date:

Previous
From: "Matheus Alcantara"
Date:
Subject: Re: Proposal: QUALIFY clause
Next
From: Andrei Lepikhov
Date:
Subject: Re: track generic and custom plans in pg_stat_statements