Re: BUG #16204: Fail to setup - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #16204: Fail to setup
Date
Msg-id 13631.1578848113@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #16204: Fail to setup  (小林 巧 <chamaharun@outlook.com>)
Responses Re: BUG #16204: Fail to setup  (小林 巧 <chamaharun@outlook.com>)
List pgsql-bugs
=?iso-2022-jp?B?GyRCPi5OUxsoQiAbJEI5KhsoQg==?= <chamaharun@outlook.com> writes:
> [root@tkw-pgcl-sv004 ~]# cat /var/lib/pgsql/10/initdb.log
> ...
> fixing permissions on existing directory /mnt/postgres/data ... ok
> ...
> Success. You can now start the database server using:
>     /usr/pgsql-10/bin/pg_ctl -D /mnt/postgres/data -l logfile start

Right.  So, clearly, initdb thinks it was told to initialize
/mnt/postgres/data.  Looking back at your original trace,
we see it being called like this:

+ runuser -l postgres -c '/usr/pgsql-10/bin/initdb
--pgdata='\''/var/lib/pgsql/10/data/'\'' --auth='\''ident'\''
--data-checksums -E utf8 --no-locale -D /mnt/postgres/data'
                                     ^^^^^^^^^^^^^^^^^^^^^

So evidently that won out over the earlier --pgdata switch,
which is unsurprising.  But it definitely looks like this
service script is confused, or else you've put a -D switch
into some option that's not supposed to contain that.

The Postgres project as such doesn't distribute systemd
service scripts, so you'll need to take this up with
whoever created the script you're using.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #16190: The usage of NULL pointer in refint.c
Next
From: Lee Everest
Date:
Subject: Unable to create a server