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: "Peter Eisentraut" <peter@eisentraut.org>
Cc: "Heikki Linnakangas" <hlinnaka@iki.fi>, "Andres Freund" <andres@anarazel.de>, "Tom Lane" <tgl@sss.pgh.pa.us>, "Tomas Vondra" <tomas@vondra.me>, "PostgreSQL-development" <pgsql-hackers@postgresql.org>
Date: 2025-11-03T17:04:28Z
Lists: pgsql-hackers

Attachments

On Wed, 29 Oct 2025 at 11:11, Peter Eisentraut <peter@eisentraut.org> wrote:
> This patch set is showing compiler warnings because pg_system() wasn't
> properly declared where needed.  Please provide an update that builds
> cleanly.

It still compiled fine on my local branch, but indeed after a rebase not anymore. I guess some include got removed in some header in the meantime. Attached an updated version (which added an storage/fd.h include).

> Also, it appears the patch for pgbench disappeared from the series.  Was
> that intentional?

Yes, the pgbench change got committed for PG18 already (see Andres' last message in the thread).

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.