Re: BUG #16204: Fail to setup

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: 小林 巧 <chamaharun(at)outlook(dot)com>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #16204: Fail to setup
Date: 2020-01-12 16:55:13
Message-ID: 13631.1578848113@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

=?iso-2022-jp?B?GyRCPi5OUxsoQiAbJEI5KhsoQg==?= <chamaharun(at)outlook(dot)com> writes:
> [root(at)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Lee Everest 2020-01-12 17:11:36 Unable to create a server
Previous Message Michael Paquier 2020-01-12 13:47:50 Re: BUG #16190: The usage of NULL pointer in refint.c