Re: pgsql: Add kqueue(2) support to the WaitEventSet API. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pgsql: Add kqueue(2) support to the WaitEventSet API.
Date
Msg-id 16353.1582555469@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Add kqueue(2) support to the WaitEventSet API.  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: pgsql: Add kqueue(2) support to the WaitEventSet API.
List 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



pgsql-hackers by date:

Previous
From: "曾文旌(义从)"
Date:
Subject: Re: [Proposal] Global temporary tables
Next
From: Tom Lane
Date:
Subject: Re: PG v12.2 - Setting jit_above_cost is causing the server to crash