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

From: Christoph Berg <myon(at)debian(dot)org>
To: Kirill Kuznetsov <kir(at)evilmartians(dot)com>, Greg Smith <greg(at)2ndQuadrant(dot)com>
Cc: pgsql-pkg-debian(at)postgresql(dot)org
Subject: Re: "ulimit -n" in postgresql/pgbouncer init scripts.
Date: 2012-12-28 11:56:54
Message-ID: 20121228115654.GB26096@msgid.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-pkg-debian

Re: Greg Smith 2012-12-26 <50DB32C7(dot)50608(at)2ndQuadrant(dot)com>
> -Edit either /etc/pam.d/su and/or /etc/pam.d/common-session and make
> sure this line is there:
>
> session required pam_limits.so
>
> That makes the way PAM is involved in switching users references the
> new user's ulimit values.

I agree that this should be the prefered way to get this resolved,
except that pg_ctlcluster doesn't invoke su(1), but does the uid
change in pure perl. We should probably fix postgresql-common to use
PAM.

That said, there's nothing really wrong with editing
/etc/default/pgbouncer or /etc/init.d/postgresql to do the ulimit
changes. These files are "conffiles", i.e. changes to them will be
preserved on package upgrades. (Of course using PAM would be nicer,
but we are not there yet.)

Christoph
--
cb(at)df7cb(dot)de | http://www.df7cb.de/

In response to

Responses

Browse pgsql-pkg-debian by date

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