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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jhebert(at)micron(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified
Date: 2022-04-29 00:02:17
Message-ID: 228299.1651190537@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2022-04-29 00:05:28 BUG #17470: Installation error
Previous Message David G. Johnston 2022-04-28 23:58:27 Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified