Re: pgsql: Add kqueue(2) support to the WaitEventSet API.
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Rémi Zara <remi_zara@mac.com>, Michael Paquier <michael@paquier.xyz>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-02-24T14:44:29Z
Lists: pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes:
> I suppose there may be users who have set ulimit -n high enough to
> support an FDW workload that connects to very many hosts, who will now
> need to set max_files_per_process higher to avoid the new error now
> that we're doing this accounting. That doesn't seem to be a problem
> in itself, but I wonder if the error message should make it clearer
> that it's our limit they hit here.
I struggled with the wording of that message, actually. The patch
proposes
+ ereport(ERROR,
+ (errcode(ERRCODE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION),
+ errmsg("could not connect to server \"%s\"",
+ server->servername),
+ errdetail("There are too many open files.")));
I wanted to say "The server has too many open files." but in context
it would seem to be talking about the remote server, so I'm not sure
how to fix that.
We could also consider a HINT, along the lines of "Raise the server's
max_files_per_process and/or \"ulimit -n\" limits." This again has
the ambiguity about which server, and it also seems dangerously
platform-specific.
regards, tom lane
Commits
-
Don't use EV_CLEAR for kqueue events.
- 9b8aa0929390 13.0 cited
-
Fix kqueue support under debugger on macOS.
- 7bc84a1f304a 13.0 landed
-
Account explicitly for long-lived FDs that are allocated outside fd.c.
- 3d475515a15f 13.0 landed
-
Add kqueue(2) support to the WaitEventSet API.
- 815c2f0972c8 13.0 cited
-
Introduce WaitEventSet API.
- 98a64d0bd713 9.6.0 cited