Re: Bump soft open file limit (RLIMIT_NOFILE) to hard limit on startup

Jelte Fennema-Nio <postgres@jeltef.nl>

From: "Jelte Fennema-Nio" <postgres@jeltef.nl>
To: "Andres Freund" <andres@anarazel.de>
Cc: "Tom Lane" <tgl@sss.pgh.pa.us>, "Tomas Vondra" <tomas@vondra.me>, "PostgreSQL-development" <pgsql-hackers@postgresql.org>
Date: 2025-02-24T09:56:23Z
Lists: pgsql-hackers

Attachments

On Thu Feb 20, 2025 at 1:37 AM CET, Andres Freund wrote:
> I've pushed this, with one trivial modification: I added %m to the error
> message in case setrlimit() fails. That's really unlikely to ever happen, but
> ...

Great! Attached are the updated other patches, I think I addressed all
feedback.

Commits

  1. Redefine max_files_per_process to control additionally opened files

  2. pgbench: Increase RLIMIT_NOFILE if necessary

  3. Move extra code out of the Pre/PostRestoreCommand() section.