Hi, currently the default max_files_per_process is 1000. fd.c uses close to that many (- NUM_RESERVED_FDS/10). count_usable_fds() makes sure that at server start there's at most that many fds available, but that doesn't mean that much for runtime.
These days there's a number of other consumers of fds. E.g. postgres_fdw, epoll, ... All these aren't accounted for by fd.c. Given how close max_files_per_process is to the default linux limit of 1024 fds, I wonder if we shouldn't increase NUM_RESERVED_FDS by quite a bit? Greetings, Andres Freund -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers