Re: Greg Smith 2012-12-26 <50DB32C7.50608@2ndQuadrant.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@df7cb.de | http://www.df7cb.de/