Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1ToYYj-0006s4-4X for pgsql-pkg-debian@arkaria.postgresql.org; Fri, 28 Dec 2012 11:57:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1ToYYi-0006Su-KW for pgsql-pkg-debian@arkaria.postgresql.org; Fri, 28 Dec 2012 11:57:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1ToYYh-0006SC-MN for pgsql-pkg-debian@postgresql.org; Fri, 28 Dec 2012 11:57:03 +0000 Received: from cl-2390.ham-01.de.sixxs.net ([2001:6f8:900:955::2] helo=feynman.df7cb.de) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1ToYYe-0000wp-V0 for pgsql-pkg-debian@postgresql.org; Fri, 28 Dec 2012 11:57:03 +0000 Received: from msgid.df7cb.de (lehmann.df7cb.de [IPv6:2001:6f8:10ee:e:136::2]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id DCB27696B6; Fri, 28 Dec 2012 12:56:56 +0100 (CET) Date: Fri, 28 Dec 2012 12:56:54 +0100 From: Christoph Berg To: Kirill Kuznetsov , Greg Smith Cc: pgsql-pkg-debian@postgresql.org Subject: Re: "ulimit -n" in postgresql/pgbouncer init scripts. Message-ID: <20121228115654.GB26096@msgid.df7cb.de> Mail-Followup-To: Christoph Berg , Kirill Kuznetsov , Greg Smith , pgsql-pkg-debian@postgresql.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="envbJBWh7q8WU6mo" Content-Disposition: inline In-Reply-To: <50DB32C7.50608@2ndQuadrant.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -0.4 (/) X-Mailing-List: pgsql-pkg-debian List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Precedence: bulk Sender: pgsql-pkg-debian-owner@postgresql.org --envbJBWh7q8WU6mo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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: >=20 > session required pam_limits.so >=20 > 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 --=20 cb@df7cb.de | http://www.df7cb.de/ --envbJBWh7q8WU6mo Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBCAAGBQJQ3YkDAAoJEExaa6sS0qeuPDkP/0NOV3t5w9PiJyXbSBO8df0t b+fadamngyAHzYopbO8cbLb1bf92TAm/7z/mpH3tKNTMC3QuXipMRFjid+tDkx3u 7YlgXu30MhAZ6jUtrBrbDJ9AgkCyPIrzfpm/c9z8ePlqDuzhOokDZMCbRhURARF9 YIJ8WqEYrMuej2zFDDjWxvqv6fDZysWgMVRXNTO7+eTVA1xUxl2EAisbiVbVnx3X crYtxqMnraCSGuZ+ASR6vs3cQBjJ3Yyoy4A2cKC5YFu6+zcwR18CUEi5nYNVbNdQ P34bOmGrA2o6fpU0XRiwGNj2suW4scsMwR0Y0wA4lEPf7KjNvMdZxddnpdp/1st9 Hypc3Kkkv91HZmZC+dM8klCfZe2/bd3e8J0Jj8Mznv6Jn0o9z8vL1xMI7BxS4RSE 7jPC6w5naFhsiydzEOk5uMImJw3YTV2bGzXeYWPzBnzL0fivRwmfghSoIcW8zI2P fEYQWdJnfJ7pZQXLheVn22WPuhHPSi3C2jyWkNx2Jqn53YhIfIAJl1VnftyBLt7F GJ8gJ1umwborfC0LlQcAE9JaWipmkoFdS8J7W/LiKqKKWVFv9kg8yEwgdbz43dl8 8/xJpPWGE4OhcwqlaHrGMMuUOIr4VaX4RSxz/QjKnUqMi37Enbrv3MnOFF5QPDzc Q4MSXO5xCXdDNRcD5bID =+M11 -----END PGP SIGNATURE----- --envbJBWh7q8WU6mo--