"ulimit -n" in postgresql/pgbouncer init scripts.

From: Kirill Kuznetsov <kir(at)evilmartians(dot)com>
To: pgsql-pkg-debian(at)postgresql(dot)org
Subject: "ulimit -n" in postgresql/pgbouncer init scripts.
Date: 2012-12-26 11:43:11
Message-ID: CAKK=MJaZ+4+ApL4+3c0h4S4shB4uciwMJ5GVbSr01i68O4n5XA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-pkg-debian by date

  From Date Subject
Next Message Greg Smith 2012-12-26 17:24:23 Re: "ulimit -n" in postgresql/pgbouncer init scripts.
Previous Message Michael Wuttke 2012-12-23 08:17:28 howto upgrade from 8.4 to 9.2 without the remove & install of postgresql