"ulimit -n" in postgresql/pgbouncer init scripts. - Mailing list pgsql-pkg-debian

From Kirill Kuznetsov
Subject "ulimit -n" in postgresql/pgbouncer init scripts.
Date
Msg-id CAKK=MJaZ+4+ApL4+3c0h4S4shB4uciwMJ5GVbSr01i68O4n5XA@mail.gmail.com
Whole thread Raw
Responses Re: "ulimit -n" in postgresql/pgbouncer init scripts.  (Greg Smith <greg@2ndQuadrant.com>)
Re: "ulimit -n" in postgresql/pgbouncer init scripts.  (Christoph Berg <myon@debian.org>)
List pgsql-pkg-debian
Hello!
I'm the devops engineer at Evil Martians (evilmartians.com). We use
postgresql+pgbouncer (9.1.6; 1.5.3) for most of the projects we are
involved in. Till now we maintained our own repository with postgresql
and pgbouncer packages. We want to switch to using your repository.
But we actually need to set open files limit (ulimit -n) for these
processes. In our packages we modified init.d script so that it
invokes "ulimit -n" command.

e.g: for pgbouncer our modification looks like:
…
ULIMIT=1024

# Include pgbouncer defaults if available
if [ -f /etc/default/pgbouncer ] ; then
        . /etc/default/pgbouncer
fi
…

case "$1" in
  start)
    …
    ulimit -n $ULIMIT
    $SSD --start --chuid $RUNASUSER --oknodo -- $OPTS 2> /dev/null
    ;;
…

Is it possible for something like this to appear in PGDG packages or
are we doing it wrong?


Thank you.

Kirill


pgsql-pkg-debian by date:

Previous
From: Michael Wuttke
Date:
Subject: howto upgrade from 8.4 to 9.2 without the remove & install of postgresql
Next
From: Greg Smith
Date:
Subject: Re: "ulimit -n" in postgresql/pgbouncer init scripts.