Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit898a792

Browse files
committed
Fix connection leak in DROP SUBSCRIPTION command.
Previously the command forgot to close the connection to the publisherwhen it failed to drop the replication slot.
1 parent1d04a59 commit898a792

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎src/backend/commands/subscriptioncmds.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,10 +546,14 @@ DropSubscription(DropSubscriptionStmt *stmt)
546546
errdetail("The error was: %s",err)));
547547

548548
if (!walrcv_command(wrconn,cmd.data,&err))
549+
{
550+
/* Close the connection in case of failure */
551+
walrcv_disconnect(wrconn);
549552
ereport(ERROR,
550553
(errmsg("could not drop the replication slot \"%s\" on publisher",
551554
slotname),
552555
errdetail("The error was: %s",err)));
556+
}
553557
else
554558
ereport(NOTICE,
555559
(errmsg("dropped replication slot \"%s\" on publisher",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp