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

Commit82d4a17

Browse files
author
Amit Kapila
committed
Fix the check to limit sync workers.
We don't allow to invoke more sync workers once we have reached the syncworker limit per subscription. But the check to enforce this also doesn'tallow to launch an apply worker if it gets restarted.This code was introduced by commitde43897 but we caught the problemonly with the test added by recent commitc91f71b which started failingoccasionally in the buildfarm.As per buildfarm.Diagnosed-by: Amit Kapila, Masahiko Sawada, Tomas VondraAuthor: Amit KapilaBackpatch-through: 10Discussion:https://postgr.es/m/CAH2L28vddB_NFdRVpuyRBJEBWjz4BSyTB=_ektNRH8NJ1jf95g@mail.gmail.comhttps://postgr.es/m/f90d2b03-4462-ce95-a524-d91464e797c8@enterprisedb.com
1 parent69cefb3 commit82d4a17

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,11 @@ logicalrep_worker_launch(Oid dbid, Oid subid, const char *subname, Oid userid,
360360
}
361361

362362
/*
363-
*If we reached thesyncworker limit per subscription, just exit
364-
*silently as we might get here because of an otherwise harmless race
365-
* condition.
363+
*We don't allow to invoke moresyncworkers once we have reached the sync
364+
*worker limit per subscription. So, just return silently as we might get
365+
*here because of an otherwise harmless racecondition.
366366
*/
367-
if (nsyncworkers >=max_sync_workers_per_subscription)
367+
if (OidIsValid(relid)&&nsyncworkers >=max_sync_workers_per_subscription)
368368
{
369369
LWLockRelease(LogicalRepWorkerLock);
370370
return;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp