zulip/puppet
Alex Vandiver ea1323c407 postgresql: Raise locked-memory limit for io_uring rings.
Since f0cc982e52, PostgreSQL 18 uses io_uring when available.
PostgreSQL creates an io_uring instance for each of the
`max_connections = 1000` possible backends.  Linux 6.14 and newer
charge that usage (8-13MiB at our default PostgreSQL settings) against
RLIMIT_MEMLOCK.  Unfortunately, the systemd default is only 8MiB; on
such kernels (e.g. Ubuntu 26.04), PostgreSQL 18 fails to start with:

    FATAL: could not setup io_uring queue: Cannot allocate memory

Raise the limit to 256MiB.  This accommodates io_uring usage even at
the maximum configurable io_max_concurrency (~100MiB), times two
clusters running concurrently during pg_upgradecluster (since the
kernel counts locked memory per-user, not per-process).

Installations on older kernels (e.g. Ubuntu 24.04's Linux 6.8) pin
the same memory without accounting it, so they start fine today but
would fail after a kernel upgrade; applying the higher limit
fixes them preemptively.
2026-06-03 10:49:10 +05:30
..
kandra kandra: Allow frontend access to camo from port 9292. 2026-05-22 11:46:19 +05:30
zulip postgresql: Raise locked-memory limit for io_uring rings. 2026-06-03 10:49:10 +05:30
deps.yaml