Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1np534-0005uN-5D for pgsql-pkg-debian@arkaria.postgresql.org; Thu, 12 May 2022 09:23:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1np532-0001hA-J4 for pgsql-pkg-debian@arkaria.postgresql.org; Thu, 12 May 2022 09:23:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1np532-0001h1-DN for pgsql-pkg-debian@lists.postgresql.org; Thu, 12 May 2022 09:23:52 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1np530-00063y-T4 for pgsql-pkg-debian@lists.postgresql.org; Thu, 12 May 2022 09:23:52 +0000 Received: from msg.df7cb.de (unknown [IPv6:2a02:908:1476:2340:c367:a479:556d:81f8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 4KzRD53JFCz3F18; Thu, 12 May 2022 11:23:49 +0200 (CEST) Date: Thu, 12 May 2022 11:23:49 +0200 From: Christoph Berg To: Tomas Pospisek Cc: pgsql-pkg-debian@lists.postgresql.org Subject: Re: Breakage: pgbouncer has changed the user under which it runs between 1.16.1 and 1.17.0 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Re: Tomas Pospisek > indeed my /etc/default/pgbouncer contains `RUNASUSER="pgbouncer"`. I do set > that explicitly via ansible. However I'm not sure where that line originated > from. I am quite sure that it's not me who came up with the idea of running > the daemon as `pgbouncer`, but instead that came from the package (which > package - if from Debian or from pgdg - I don't know I would have to dig > further, but maybe I could figure it out). Hi Tomas, It's true that the upstream pgbouncer default is to use "pgbouncer" instead of "postgres", but Debian's /etc/init.d/pgbouncer has had RUNASUSER="postgres" since 2012, and /etc/default/pgbouncer has not been changed since 2008. > So what is happening after the introduction of the `.service` file is that > either `/etc/default/pgbouncer` is now beeing ignored or it is being > overriden. That breaks installations that had `RUNASUSER="pgbouncer"` set in > `/etc/default/pgbouncer` when upgrading to 1.17.x. > > Do you concur with that conclusion? Yes, but TBH I'd rather not reintroduce the usage of /etc/default in a .service file when everyone else is moving away from that schema. To override the settings from the package .service file, do this: /etc/systemd/system/pgbouncer.service.d/user.conf: [Service] User=pgbouncer Christoph