pgsql: Distinguish between AcquireExternalFD and epoll_create1 / kqueue

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Distinguish between AcquireExternalFD and epoll_create1 / kqueue
Date: 2024-11-26 17:52:20
Message-ID: E1tFzjY-003dr5-02@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Distinguish between AcquireExternalFD and epoll_create1 / kqueue failing

The error messages in CreateWaitEventSet() made it hard to know whether the
syscall or AcquireExternalFD() failed. This is particularly relevant because
AcquireExternalFD() imposes a lower limit than what would cause syscalls fail
with EMFILE.

I did not change the message in libpqsrv_connect_prepare(), which is the one
other use of AcquireExternalFD() in our codebase, as the error message already
is less ambiguous.

Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Discussion: https://postgr.es/m/xjjx7r4xa7beixuu4qtkdhnwdbchrrpo3gaeb3jsbinvvdiat5@cwjw55mna5of

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b8f9afc81f26ead612fcfe76301c01d110e36c7e

Modified Files
--------------
src/backend/storage/ipc/latch.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2024-11-26 18:08:16 pgsql: Fix commit 641a5b7a144 for "nbsp" output in SVG files
Previous Message Peter Eisentraut 2024-11-26 17:10:15 pgsql: meson: Build pgevent as shared_module rather than shared_library