]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix the check to limit sync workers.
authorAmit Kapila <akapila@postgresql.org>
Tue, 19 Apr 2022 03:38:05 +0000 (09:08 +0530)
committerAmit Kapila <akapila@postgresql.org>
Tue, 19 Apr 2022 03:38:05 +0000 (09:08 +0530)
commit82d4a17a17508a4e6ff9038d81a7dfb9f19e104a
tree243e640cbc26e933eddc6f495efdf2dc2b4edaf1
parent69cefb3fb8377992bd2ad0dce1b33570b3e5244a
Fix the check to limit sync workers.

We don't allow to invoke more sync workers once we have reached the sync
worker limit per subscription. But the check to enforce this also doesn't
allow to launch an apply worker if it gets restarted.

This code was introduced by commit de43897122 but we caught the problem
only with the test added by recent commit c91f71b9dc which started failing
occasionally in the buildfarm.

As per buildfarm.
Diagnosed-by: Amit Kapila, Masahiko Sawada, Tomas Vondra
Author: Amit Kapila
Backpatch-through: 10
Discussion: https://postgr.es/m/CAH2L28vddB_NFdRVpuyRBJEBWjz4BSyTB=_ektNRH8NJ1jf95g@mail.gmail.com
    https://postgr.es/m/f90d2b03-4462-ce95-a524-d91464e797c8@enterprisedb.com
src/backend/replication/logical/launcher.c