pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #17469: postgresql-11.service file not configured to match setup/initdb options specified
6+ messages / 5 participants
[nested] [flat]
* BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified
@ 2022-04-28 23:18 PG Bug reporting form <noreply@postgresql.org>
2022-04-28 23:58 ` Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified David G. Johnston <david.g.johnston@gmail.com>
2022-04-29 00:02 ` Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified Tom Lane <tgl@sss.pgh.pa.us>
2022-05-16 01:07 ` Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified Devrim Gündüz <devrim@gunduz.org>
0 siblings, 3 replies; 6+ messages in thread
From: PG Bug reporting form @ 2022-04-28 23:18 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: jhebert@micron.com
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:
The following command was used to initialize the database (separate issue
with postgresql-11-setup not working):
/usr/pgsql-11/bin/initdb -A password -E utf8 -D /postgres/data/datafiles -X
/postgres/tranlog
Initialization completed successfully.
Then ran: sudo systemctl enable postgresql-11
Result: Created symlink
/etc/systemd/system/multi-user.target.wants/postgresql-11.service â
/usr/lib/systemd/system/postgresql-11.service.
Then ran: sudo systemctl start postgresql-11
Result:
Job for postgresql-11.service failed because the control process exited with
error code.
See "systemctl status postgresql-11.service" and "journalctl -xe" for
details.
sudo systemctl status postgresql-11
â postgresql-11.service - PostgreSQL 11 database server
Loaded: loaded (/usr/lib/systemd/system/postgresql-11.service; enabled;
vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2022-04-27 16:19:40 MDT; 28s
ago
Docs: https://www.postgresql.org/docs/11/static/
Process: 147756 ExecStartPre=/usr/pgsql-11/bin/postgresql-11-check-db-dir
${PGDATA} (code=exited, status=1/FAILURE)
Apr 27 16:19:40 systemd[1]: Starting PostgreSQL 11 database server...
Apr 27 16:19:40 systemd[1]: postgresql-11.service: Control process exited,
code=exited status=1
Apr 27 16:19:40 systemd[1]: postgresql-11.service: Failed with result
'exit-code'.
Apr 27 16:19:40 systemd[1]: Failed to start PostgreSQL 11 database
server.
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.
Work-around: sudo systemctl edit --full postgresql-11
replaced the content, fixing the incorrect path
Result: PostgreSQL instance started successfully
If this is not considered a bug, please consider addressing this as an
enhancement. As a side note, I tried the "sudo systemctl edit" command
without the --full option to only override the one line, however, the issue
still persisted and required a wholesale replacement of the
postgresql-11.service file.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified
2022-04-28 23:18 BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified PG Bug reporting form <noreply@postgresql.org>
@ 2022-04-28 23:58 ` David G. Johnston <david.g.johnston@gmail.com>
2022-04-29 17:34 ` RE: [EXT] Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified Joe Hebert (jhebert) <jhebert@micron.com>
2 siblings, 1 reply; 6+ messages in thread
From: David G. Johnston @ 2022-04-28 23:58 UTC (permalink / raw)
To: jhebert@micron.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
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.
^ permalink raw reply [nested|flat] 6+ messages in thread
* RE: [EXT] Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified
2022-04-28 23:18 BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified PG Bug reporting form <noreply@postgresql.org>
2022-04-28 23:58 ` Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified David G. Johnston <david.g.johnston@gmail.com>
@ 2022-04-29 17:34 ` Joe Hebert (jhebert) <jhebert@micron.com>
0 siblings, 0 replies; 6+ messages in thread
From: Joe Hebert (jhebert) @ 2022-04-29 17:34 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>
Micron Confidential
Hi David,
Thanks for your response. Initially I was attempting to use sudo to initialize the DB per the sample commands provided at the following web page:
https://www.postgresql.org/download/linux/redhat/
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified
2022-04-28 23:18 BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified PG Bug reporting form <noreply@postgresql.org>
@ 2022-04-29 00:02 ` Tom Lane <tgl@sss.pgh.pa.us>
2 siblings, 0 replies; 6+ messages in thread
From: Tom Lane @ 2022-04-29 00:02 UTC (permalink / raw)
To: jhebert@micron.com; +Cc: pgsql-bugs@lists.postgresql.org
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
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified
2022-04-28 23:18 BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified PG Bug reporting form <noreply@postgresql.org>
@ 2022-05-16 01:07 ` Devrim Gündüz <devrim@gunduz.org>
2022-05-16 18:48 ` RE: [EXT] Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified Joe Hebert (jhebert) <jhebert@micron.com>
2 siblings, 1 reply; 6+ messages in thread
From: Devrim Gündüz @ 2022-05-16 01:07 UTC (permalink / raw)
To: jhebert@micron.com; pgsql-bugs@lists.postgresql.org
Hi,
On Thu, 2022-04-28 at 23:18 +0000, PG Bug reporting form wrote:
> Bug reference: 17469
> Logged by: Joe Hebert
> Email address: jhebert@micron.com
> PostgreSQL version: 11.11
> Operating system: RHEL 8.5
> Description:
>
> The following command was used to initialize the database (separate
> issue with postgresql-11-setup not working):
What is the problem with that setup script?
Regards,
--
Devrim Gündüz
Open Source Solution Architect, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 6+ messages in thread
* RE: [EXT] Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified
2022-04-28 23:18 BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified PG Bug reporting form <noreply@postgresql.org>
2022-05-16 01:07 ` Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified Devrim Gündüz <devrim@gunduz.org>
@ 2022-05-16 18:48 ` Joe Hebert (jhebert) <jhebert@micron.com>
0 siblings, 0 replies; 6+ messages in thread
From: Joe Hebert (jhebert) @ 2022-05-16 18:48 UTC (permalink / raw)
To: Devrim Gündüz <devrim@gunduz.org>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Micron Confidential
Hi Devrim,
I have attached a previous response which has more details. Those details should probably be added to the case notes.
Thanks,
Joe
Micron Confidential
-----Original Message-----
From: Devrim Gündüz <devrim@gunduz.org>
Sent: Sunday, May 15, 2022 7:07 PM
To: Joe Hebert (jhebert) <jhebert@micron.com>; pgsql-bugs@lists.postgresql.org
Subject: [EXT] Re: BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified
CAUTION: EXTERNAL EMAIL. Do not click links or open attachments unless you recognize the sender and were expecting this message.
Micron Confidential
Hi David,
Thanks for your response. Initially I was attempting to use sudo to initialize the DB per the sample commands provided at the following web page:
https://www.postgresql.org/download/linux/redhat/
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2022-05-16 18:48 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 23:18 BUG #17469: postgresql-11.service file not configured to match setup/initdb options specified PG Bug reporting form <noreply@postgresql.org>
2022-04-28 23:58 ` David G. Johnston <david.g.johnston@gmail.com>
2022-04-29 17:34 ` Joe Hebert (jhebert) <jhebert@micron.com>
2022-04-29 00:02 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-05-16 01:07 ` Devrim Gündüz <devrim@gunduz.org>
2022-05-16 18:48 ` Joe Hebert (jhebert) <jhebert@micron.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox