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 1nkE5X-0003z0-1o for pgsql-bugs@arkaria.postgresql.org; Fri, 29 Apr 2022 00:02:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nkE5V-0006ad-8z for pgsql-bugs@arkaria.postgresql.org; Fri, 29 Apr 2022 00:02:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nkE5V-0006aO-0l for pgsql-bugs@lists.postgresql.org; Fri, 29 Apr 2022 00:02:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nkE5S-0002Hn-Pj for pgsql-bugs@lists.postgresql.org; Fri, 29 Apr 2022 00:02:19 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 23T02HkI228300; Thu, 28 Apr 2022 20:02:17 -0400 From: Tom Lane To: jhebert@micron.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified In-reply-to: <17469-b677bc5397f04366@postgresql.org> References: <17469-b677bc5397f04366@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Thu, 28 Apr 2022 23:18:17 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <228298.1651190537.1@sss.pgh.pa.us> Date: Thu, 28 Apr 2022 20:02:17 -0400 Message-ID: <228299.1651190537@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > After researching further, I reviewed file > /usr/lib/systemd/system/postgresql-11.service > and found the following offending line: > Environment=PGDATA=/var/lib/pgsql/11/data/ > Which should have been set to /postgres/data/datafiles based in the option > provided to the initdb command. Hmm. initdb knows nothing about systemd unit files, and would not have the permissions to modify them even if it did know, since it doesn't run as root. > If this is not considered a bug, please consider addressing this as an > enhancement. This isn't really a matter for the core Postgres distribution, because not one of the files you mention is part of the core Postgres distribution. You could take it up with whoever produces the package you are using. My guess is that the packager will say that manual invocation of initdb isn't the right way in their package and you should use some wrapper script instead --- in which case you could move on to why the wrapper script isn't adequately documented or how it lacks some functionality you need. But this list isn't well positioned to help you. regards, tom lane