Re: Patch for not going beyond NOFILE system limit - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: Patch for not going beyond NOFILE system limit
Date
Msg-id 200405171242.i4HCg9n13540@candle.pha.pa.us
Whole thread Raw
In response to Patch for not going beyond NOFILE system limit  (Martin Pitt <martin@piware.de>)
Responses Re: Patch for not going beyond NOFILE system limit
List pgsql-bugs
We have already fixed this in CVS and the fix will be in 7.5:

    revision 1.107
    date: 2004/02/23 20:45:59;  author: tgl;  state: Exp;  lines: +145 -88
    Do a direct probe during postmaster startup to determine the maximum
    number of openable files and the number already opened.  This eliminates
    depending on sysconf(_SC_OPEN_MAX), and allows much saner behavior on
    platforms where open-file slots are used up by semaphores.


---------------------------------------------------------------------------

Martin Pitt wrote:
-- Start of PGP signed section.
> 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@piware.de                      mpitt@debian.org
> http://www.piware.de             http://www.debian.org

[ Attachment, skipping... ]
-- End of PGP section, PGP failed!

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-bugs by date:

Previous
From: Martin Pitt
Date:
Subject: Re: Fwd: Bug#249036: postgresql: zero bytes cannot be entered in string literal, not even with \000 notation
Next
From: Martin Pitt
Date:
Subject: Fix for buffer overflow ready [was: Fwd: Bug#247306: odbc-postgresql: SIGSEGV with long inputs (> 10000 bytes)]