On Thu, 24 Jul 2025 at 17:45, Ajin Cherian <itsa...@gmail.com> wrote: > > On Wed, Jul 23, 2025 at 8:01 PM Hayato Kuroda (Fujitsu) > <kuroda.hay...@fujitsu.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