Patch for not going beyond NOFILE system limit

From: Martin Pitt <martin(at)piware(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Patch for not going beyond NOFILE system limit
Date: 2004-05-17 12:24:30
Message-ID: 20040517122429.GA2909@donald.intranet.fbn-dd.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi PostgreSQL developers!

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.

Can you please adopt this patch?

Currently the modifications are only enabled when postgresql is
compiled with -DCHECK_RLIMIT_NOFILE. Of course you can also use it
unconditionally.

Thanks for considering and have a nice day!

Martin

--
Martin Pitt Debian GNU/Linux Developer
martin(at)piware(dot)de mpitt(at)debian(dot)org
http://www.piware.de http://www.debian.org

Attachment Content-Type Size
08check_rlimit_nofile text/plain 1.0 KB

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2004-05-17 12:37:52 Re: Fwd: Bug#249036: postgresql: zero bytes cannot be entered
Previous Message Martin Pitt 2004-05-17 12:08:22 Fwd: Bug#249036: postgresql: zero bytes cannot be entered in string literal, not even with \000 notation