Re: [Patch] Improve the test src/test/postmaster/t/003_start_stop.pl

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Potapov Alexander <a(dot)potapov(at)postgrespro(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [Patch] Improve the test src/test/postmaster/t/003_start_stop.pl
Date: 2025-12-10 13:28:34
Message-ID: 908819ce-434f-4ed6-ad62-3cab438abd1c@iki.fi
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/12/2025 14:32, Potapov Alexander wrote:
> 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 use all possible connection slots. 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.

This seems a little pointless because the test explicitly sets
max_connectins and max_wal_senders. It's true that it currently uses
more iterations than strictly necessary, but does it matter?

- Heikki

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2025-12-10 13:30:02 Re: Improve comment in function GetPublicationRelations
Previous Message Laurenz Albe 2025-12-10 13:12:37 Re: postgres_fdw prefers fast plans