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

From Tom Lane
Subject Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified
Date
Msg-id 228299.1651190537@sss.pgh.pa.us
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>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> 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



pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified
Next
From: PG Bug reporting form
Date:
Subject: BUG #17470: Installation error