From: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Refactoring postmaster's code to cleanup after child exit |
Date: | 2024-10-04 18:41:13 |
Message-ID: | b892e94c-3511-435a-bc2b-48e052589c16@iki.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 06/09/2024 12:52, Heikki Linnakangas wrote:
> Unless you have comments on these first two patches which just add
> tests, I'll commit them shortly. Still processing the rest of your
> comments...
Didn't happen as "shortly" as I thought..
My test for dead-end backends opens 20 TCP (or unix domain) connections
to the server, in quick succession. That works fine my system, and it
passed cirrus CI on other platforms, but on FreeBSD it failed
repeatedly. The behavior in that scenario is apparently
platform-dependent: it depends on the accept queue size, but what
happens when you reach the queue size also seems to depend on the
platform. On my Linux system, the connect() calls in the client are
blocked, if the server is doesn't call accept() fast enough, but
apparently you get an error on *BSD systems.
I'm not sure of the exact details, but in any case, platform-dependent
behavior needs to be avoided in tests. So I changed the test so that it
sends an SSLRequest packet on each connection and waits for reply (which
is always 'N' to reject it in this test), before opening the next
connection. This way, each connection is still left hanging, which is
what I want in this test, but only after postmaster has successfully
accept()ed it and forked the backend.
So here are these test patches again, with that addition.
--
Heikki Linnakangas
Neon (https://neon.tech)
Attachment | Content-Type | Size |
---|---|---|
v5-0001-Add-test-for-connection-limits.patch | text/x-patch | 6.6 KB |
v5-0002-Add-test-for-dead-end-backends.patch | text/x-patch | 4.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Noah Misch | 2024-10-04 18:57:48 | Re: IPC::Run accepts bug reports |
Previous Message | Robert Haas | 2024-10-04 18:40:30 | Re: POC, WIP: OR-clause support for indexes |