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

Commit5961722

Browse files
committed
pgstat: drop subscription stats regardless of slot, fix comment
There's no reason anymore to only drop subscription stats if associated with aslot, now that stats drops are transactional. Additionally, the commentreferring to autovacuum cleaning up stats was clearly outdated.Author: Masahiko Sawada <sawada.mshk@gmail.com>Discussion:https://postgr.es/m/CAD21AoAwiby3HeJE7vJe16Gr75RFfJ640dyHqvsiUhyKJTXPtw@mail.gmail.comBackpatch: 15-
1 parent30efc3b commit5961722

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

‎src/backend/commands/subscriptioncmds.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,15 +1579,9 @@ DropSubscription(DropSubscriptionStmt *stmt, bool isTopLevel)
15791579

15801580
/*
15811581
* Tell the cumulative stats system that the subscription is getting
1582-
* dropped. We can safely report dropping the subscription statistics here
1583-
* if the subscription is associated with a replication slot since we
1584-
* cannot run DROP SUBSCRIPTION inside a transaction block. Subscription
1585-
* statistics will be removed later by (auto)vacuum either if it's not
1586-
* associated with a replication slot or if the message for dropping the
1587-
* subscription gets lost.
1582+
* dropped.
15881583
*/
1589-
if (slotname)
1590-
pgstat_drop_subscription(subid);
1584+
pgstat_drop_subscription(subid);
15911585

15921586
table_close(rel,NoLock);
15931587
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp