BUG #17992: Followed instructions to setup Postgresql but systemctl restart postgresql-15.service

Started by PG Bug reporting formalmost 3 years ago1 messagesbugs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following bug has been logged on the website:

Bug reference: 17992
Logged by: Salam Elias
Email address: salam@salam.hd.free.fr
PostgreSQL version: 15.0
Operating system: Centos 7
Description:

I followed instructions as follows to setup postgres
Sudo yum -y install
https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
981 yum list postgresql*
982 sudo yum list postgresql*
983 sudo yum install -y postgresql15-server postgresql15-contrib
984 sudo /usr/pgsql-15/bin/postgresql-15-setup initdb
status OK

but when I run
sudo systemctl start postgresql-15

I get
Job for postgresql-15.service failed because the control process exited with
error code. See "systemctl status postgresql-15.service" and "journalctl
-xe" for details.
[salam@pemaster ~]$ sudo systemctl restart postgresql
Failed to restart postgresql.service: Unit is not loaded properly: Invalid
argument.
See system logs and 'systemctl status postgresql.service' for details.

After googlin, I found a thread indicating that data directory should be
owned by postgres user so I did

sudo chown -R postgres:postgres /var/lib/pgsql/15/data

but it did not help. What I am missing?

After googling I tried also