Re: 024_add_drop_pub.pl might fail due to deadlock

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: Ajin Cherian <itsajin(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Alexander Lakhin <exclusion(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 024_add_drop_pub.pl might fail due to deadlock
Date: 2025-07-29 03:13:21
Message-ID: CAA4eK1Lqj1UdjrrZdAQ9WQ=yUJSHDn_YdAZjXtEYMDWqCwXdGw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 29, 2025 at 7:23 AM Hayato Kuroda (Fujitsu)
<kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
>
> > Thanks for your review Kuroda-san, I have changed the logic to not use
> > already_locked and instead check if the locks are taken inside
> > UpdateSubscriptionRelState itself. I've tested this and this works
> > fine. If this logic is acceptable to the reviewers I can update the
> > other patches also in a similar way.
>
> Thanks for updates.
> However, I found that functions like LockHeldByMe(), CheckRelationOidLockedByMe()
> and LWLockHeldByMe() have been used only for the debug build. Functions like
> ProcArraySetReplicationSlotXmin() and MarkAsPrepared() can remove the flag from
> the argument but they are retained till now.
> Based on that, I suggest adding new argument (or add new Ex function for bank branches)
> and do the assertion check when the assertion is enabled in this build. Thought?
>

Yes, that makes sense to me. For HEAD and PG18, we can still add a new
argument to the API. For other bank branches, it is better to use a
new Ex function as suggested by Kuroda-San.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2025-07-29 03:13:53 Re: implement CAST(expr AS type FORMAT 'template')
Previous Message Michael Paquier 2025-07-29 03:07:42 Re: Bogus bitmasking in heap2_desc