Improve the test src/test/postmaster/t/003_start_stop.pl

From: "Potapov Alexander" <a(dot)potapov(at)postgrespro(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Improve the test src/test/postmaster/t/003_start_stop.pl
Date: 2025-11-30 08:21:27
Message-ID: e5688-692bfe80-7-5e495f00@53075387
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello, This is about the TAP test src/test/postmaster/t/003_start_stop.pl. The test contains a loop that performs 21 iterations in order to occupy all possible connections. We could calculate the number of available connections more accurately. It relates to the size of backend pool that is defined in src/backend/postmaster/pmchild.c:     pmchild_pools[B_BACKEND].size = 2 * (MaxConnections + max_wal_senders); There are two points here: (1) in current implementation the test performs 11 extra iterations instead of 10 that are really needed. (2) We need to change the hardcoded value every time if the number of max connections or the number of max wal senders are changed. If we  use 2 * (MaxConnections + max_wal_senders) the test becomes a bit convinent. A patch attached. Best regards,Alexander Potapov

Attachment Content-Type Size
0001-Improve-the-test-003_start_stop.pl.patch application/octet-stream 1.4 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Potapov Alexander 2025-11-30 09:11:44 PG version is not seen in pg_upgrade test log
Previous Message Pavel Stehule 2025-11-30 06:01:42 Re: proposal: schema variables