Re: BUG #18988: DROP SUBSCRIPTION locks not-yet-accessed database

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Álvaro Herrera <alvherre(at)kurilemu(dot)de>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, "exclusion(at)gmail(dot)com" <exclusion(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #18988: DROP SUBSCRIPTION locks not-yet-accessed database
Date: 2025-08-18 16:41:04
Message-ID: CALDaNm3H9_irskMhT8dKNDZxmNWAorumHGBrPnVqSE0rda+HZw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, 18 Aug 2025 at 19:52, Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
>
> On Mon, Aug 18, 2025 at 2:56 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > Looks mostly good. How about slightly changing the comment as in attached?
>
> Your suggestion LGTM, I am making back branch patches. I observed
> another behavior change in the test in v13. The $sdterr is matching
> with error details not with the error code, so for v13 i have to
> modify the error comparison string as [1] whereas with other versions
> it's like [2]. But if we execute this test from psql then I can see
> the same error in v13 as well[3]. Not sure why perl is behaving
> differently.

The error message in PG13 and master branch is different, that is the
reason the test was failing.
The error in master is: could not drop replication slot whereas the
error message in PG13 is: could not drop the replication slot.
The test passes with the below change in PG13:
--- a/src/test/subscription/t/100_bugs.pl
+++ b/src/test/subscription/t/100_bugs.pl
@@ -315,7 +315,7 @@ my ($ret, $stdout, $stderr) =
isnt($ret, 0, "replication slot does not exist: exit code not 0");
like(
$stderr,
- qr/ERROR: replication slot "regress_sub1" does not exist/,
+ qr/ERROR: could not drop the replication slot "regress_sub1"
on publisher/,
"could not drop replication slot: error message");

$node_publisher->safe_psql('postgres', "DROP DATABASE regress_db");

Regards,
Vignesh

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrew Dunstan 2025-08-18 19:16:46 Re: Error pg_upgrade version 11 to 15
Previous Message Tom Lane 2025-08-18 16:10:05 Re: Error pg_upgrade version 11 to 15