Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 22139df

Browse files
knizhnikkelvich
authored andcommitted
Change criteria of starting new dynamic worker
1 parent 609a66e commit 22139df

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

bgwpool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ void BgwPoolExecute(BgwPool* pool, void* work, size_t size)
205205
SpinLockAcquire(&pool->lock);
206206
} else {
207207
pool->pending += 1;
208-
if (pool->active == pool->nWorkers) {
208+
if (pool->active + pool->pending > pool->nWorkers) {
209209
BgwStartExtraWorker(pool);
210210
}
211211
if (pool->lastPeakTime == 0 && pool->active == pool->nWorkers && pool->pending != 0) {

tests2/docker-entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ if [ "$1" = 'postgres' ]; then
5959
default_transaction_isolation = 'repeatable read'
6060
log_line_prefix = '%t: '
6161
62-
multimaster.workers = 16
62+
multimaster.workers = 4
63+
multimaster.max_workers = 16
6364
multimaster.max_nodes = 3
6465
multimaster.volkswagen_mode = 1
6566
multimaster.queue_size=52857600

0 commit comments

Comments
 (0)