Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified
Date
Msg-id CAKFQuwaTW4XL4aiZu_G-wDqeoeJ=3COOyEYrYfoeOKSc5USCqg@mail.gmail.com
Whole thread Raw
In response to BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified  (PG Bug reporting form <noreply@postgresql.org>)
Responses RE: [EXT] Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified  ("Joe Hebert (jhebert)" <jhebert@micron.com>)
List pgsql-bugs
On Thu, Apr 28, 2022 at 4:42 PM PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      17469
Logged by:          Joe Hebert
Email address:      jhebert@micron.com
PostgreSQL version: 11.11
Operating system:   RHEL 8.5
Description:       

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.

I'm curious to know where you got the idea that initdb integrated with systemd.  I'm under the impression it doesn't.  PostgreSQL core doesn't generally deal with such platform-specific concerns (i.e., it isn't a feature enhancement we would consider).

If you go against the conventions of your packaged distribution (or do not avail yourself of its tooling) you have to do the customizations yourself.

David J.

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified
Next
From: Tom Lane
Date:
Subject: Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified