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

Commite42351a

Browse files
committed
Simplify some code in logical replication launcher
Avoid unnecessary locking calls when a subscription is disabled.Author: Yugo Nagata <nagata@sraoss.co.jp>
1 parent270fec9 commite42351a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/backend/replication/logical/launcher.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,11 +929,14 @@ ApplyLauncherMain(Datum main_arg)
929929
Subscription*sub= (Subscription*)lfirst(lc);
930930
LogicalRepWorker*w;
931931

932+
if (!sub->enabled)
933+
continue;
934+
932935
LWLockAcquire(LogicalRepWorkerLock,LW_SHARED);
933936
w=logicalrep_worker_find(sub->oid,InvalidOid, false);
934937
LWLockRelease(LogicalRepWorkerLock);
935938

936-
if (sub->enabled&&w==NULL)
939+
if (w==NULL)
937940
{
938941
last_start_time=now;
939942
wait_time=wal_retrieve_retry_interval;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp