Patch for not going beyond NOFILE system limit (updated)

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Patch for not going beyond NOFILE system limit (updated)
Date: 2009-02-27 12:50:49
Message-ID: 49A7E1A9.6050405@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

This is an updated and properly autoconf-guarded patch for this
previously reported issue:

"""
Jacek Drobiecki recently sent me a patch which stops postgresql to
actively violate the system limit of maximum open files
(RLIMIT_NOFILE) in src/backend/storage/file/fd.c, function
count_usable_fds().

This avoids irritating kernel logs (if system overstep violations are
enabled) and also the grsecurity alert when starting PostgreSQL.
"""

References:
http://archives.postgresql.org/pgsql-bugs/2004-05/msg00103.php
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=248967

I think we can put this into 8.4 or the first commit fest of 8.5.

Attachment Content-Type Size
check-rlimits-nofile.patch text/x-diff 1.5 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2009-02-27 14:19:04 Re: Hot Standby - >8.5
Previous Message Heikki Linnakangas 2009-02-27 12:19:26 Re: Immediate shutdown and system(3)