Re: pgsql: Add kqueue(2) support to the WaitEventSet API.
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Rémi Zara <remi_zara@mac.com>, Michael Paquier <michael@paquier.xyz>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-02-24T06:53:34Z
Lists: pgsql-hackers
On Mon, Feb 24, 2020 at 7:42 PM Thomas Munro <thomas.munro@gmail.com> wrote: > On Mon, Feb 24, 2020 at 12:24 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > On reflection, trying to make ReserveExternalFD serve two different > > use-cases was pretty messy. Here's a version that splits it into two > > functions. I also took the trouble to fix dblink. > > + /* > + * We don't want more than max_safe_fds / 3 FDs to be consumed for > + * "external" FDs. > + */ > + if (numExternalFDs < max_safe_fds / 3) 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.
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