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-03-17T23:08:03Z
Lists: pgsql-hackers

Attachments

On Mon Feb 24, 2025 at 12:01 PM CET, Jelte Fennema-Nio wrote:
> Right after pressing send I realized I could remove two more useless
> lines...

Rebased patchset attached (trivial conflict against pg_noreturn
changes).

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.