From: | vignesh C <vignesh21(at)gmail(dot)com> |
---|---|
To: | Ajin Cherian <itsajin(at)gmail(dot)com> |
Cc: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Alexander Lakhin <exclusion(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Subject: | Re: 024_add_drop_pub.pl might fail due to deadlock |
Date: | 2025-07-25 08:46:06 |
Message-ID: | CALDaNm2DguXQmcJd099L94Y35UwdXaYCt6eOHdyb9XWq74BTfw@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, 24 Jul 2025 at 17:45, Ajin Cherian <itsajin(at)gmail(dot)com> wrote:
>
> On Wed, Jul 23, 2025 at 8:01 PM Hayato Kuroda (Fujitsu)
> <kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
> >
> > > Dear Ajin,
> > >
> > > Thanks for the patch. Firstly let me confirm my understanding. While altering the
> > > subscription, locks are acquired with below ordering:
> > >
> >
> > I forgot to confirm one point. For which branch should be backpatch? Initially
> > it was reported only on PG15 [1], but I found 021_alter_sub_pub could fail on PG14.
>
> Yes, here's a patch for PG14 as well, based on REL_14_STABLE.
>
I believe the patch is trying the address the following issues reported:
1) 024_add_drop_pub.pl test failure reported on REL_16_STABLE at [1]
2) Different variation of the above issue on head with the script
attached at [2]
3) Amit reported different variant of it for PG15 with the patch at [3]
I felt these issues are not applicable to the PG13 branch as
Replication origin creation for table sync is not there in the PG13
branch. So the fix is required from master to PG14 branches.
The patch does not apply on the PG16 branch.
In PG15 you have the following code:
+ /* Close table if opened */
+ if (rel)
+ {
+ table_close(rel, NoLock);
+ }
In master branch you have the following code:
+ /* Close table if opened */
+ if (rel)
+ table_close(rel, NoLock);
+
+
We can keep the fix consistent in both cases and additional newlines
not required in the master branch.
[1] - https://www.postgresql.org/message-id/bab95e12-6cc5-4ebb-80a8-3e41956aa297%40gmail.com
[2] - https://www.postgresql.org/message-id/CALDaNm3PrTkVc2uxMyQTkqw0sg7O6i0EXe1jJo9CzOyW2gFS%2BQ%40mail.gmail.com
[3] - https://www.postgresql.org/message-id/CAA4eK1KPa1dJrcd%3DXfOWx-r37eZudKQRqct0tY1R7vnUw0OabQ%40mail.gmail.com
Regards,
Vignesh
From | Date | Subject | |
---|---|---|---|
Next Message | Hannu Krosing | 2025-07-25 08:48:46 | Re: Retail DDL |
Previous Message | Hannu Krosing | 2025-07-25 08:43:50 | Re: Retail DDL |