Re: BUG #16204: Fail to setup

小林 巧 <[email protected]> Mon, 13 Jan 2020 09:50:14 +0000
Newsgroups gmane.comp.db.postgresql.bugs
Message-ID <TYAPR01MB38852D852A730811ED8DC796DA350@TYAPR01MB3885.jpnprd01.prod.outlook.com>
--_000_TYAPR01MB38852D852A730811ED8DC796DA350TYAPR01MB3885jpnp_
Content-Type: text/plain; charset="iso-2022-jp"
Content-Transfer-Encoding: quoted-printable

Thanks.


>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.

Before I install postgresql-10 server, it is no systemd unit file:

[root@tkw-pgcl-sv003 ~]# ls -l /lib/systemd/system/posttgres*
ls: /lib/systemd/system/postgres* =1B$B$K%"%/%;%9$G$-$^$;$s=1B(B: =1B$B$=3D=
$N$h$&$J%U%!%$%k$d%G%#%l%/%H%j$O$"$j$^$;$s=1B(B

But after install it be created:

[root@tkw-pgcl-sv003 ~]# ls -l /lib/systemd/system/postgres*
-rw-r--r--. 1 root root 1728 11=1B$B7n=1B(B 30 23:29 /lib/systemd/system/po=
stgresql-10.service

[root@tkw-pgcl-sv003 ~]# cat /lib/systemd/system/postgresql-10.service
# It's not recommended to modify this file in-place, because it will be
# overwritten during package upgrades.  If you want to customize, the
# best way is to create a file "/etc/systemd/system/postgresql-10.service",
# containing
# .include /usr/lib/systemd/system/postgresql-10.service
# ...make your changes here...
# For more info about custom unit files, see
# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_a=
dd_a_custom_unit_file.3F

# Note: changing PGDATA will typically require adjusting SELinux
# configuration as well.

# Note: do not use a PGDATA pathname containing spaces, or you will
# break postgresql-setup.
[Unit]
Description=3DPostgreSQL 10 database server
Documentation=3Dhttps://www.postgresql.org/docs/10/static/
After=3Dsyslog.target
After=3Dnetwork.target

[Service]
Type=3Dnotify

User=3Dpostgres
Group=3Dpostgres

# Note: avoid inserting whitespace in these Environment=3D lines, or you ma=
y
# break postgresql-setup.

# Location of database directory
Environment=3DPGDATA=3D/var/lib/pgsql/10/data/

# Where to send early-startup messages from the server (before the logging
# options of postgresql.conf take effect)
# This is normally controlled by the global default set by systemd
# StandardOutput=3Dsyslog

# Disable OOM kill on the postmaster
OOMScoreAdjust=3D-1000
Environment=3DPG_OOM_ADJUST_FILE=3D/proc/self/oom_score_adj
Environment=3DPG_OOM_ADJUST_VALUE=3D0

ExecStartPre=3D/usr/pgsql-10/bin/postgresql-10-check-db-dir ${PGDATA}
ExecStart=3D/usr/pgsql-10/bin/postmaster -D ${PGDATA}
ExecReload=3D/bin/kill -HUP $MAINPID
KillMode=3Dmixed
KillSignal=3DSIGINT


# Do not set any timeout value, so that systemd will not kill postmaster
# during crash recovery.
TimeoutSec=3D0

[Install]
WantedBy=3Dmulti-user.target








The systemd unit file seems to derive from the rpm package the official sit=
e distributes.
So where should I contact to solve this issue?


I installed postgresql-10 server from the repository from official website:
https://yum.postgresql.org/repopackages.php

And installed commands are:

# yum -y install https://downloareporpms/EL-7-x86_64/pgdg-redhat-repo-lates=
t.noarch.rpm
# yum -y install postgresql10-server postgresql10-contrib
# mkdir /mnt/postgres
# mkdir /mnt/postgres/data
# chown postgres:postgres /mnt/postgres/data


Best regards, Takumi Kobayashi
________________________________
=1B$B:9=3DP?M=1B(B: Tom Lane <[email protected]>
=1B$BAw?.F|;~=1B(B: 2020=1B$BG/=1B(B1=1B$B7n=1B(B13=1B$BF|=1B(B 1:55
=1B$B08@h=1B(B: =1B$B>.NS=1B(B =1B$B9*=1B(B <[email protected]>
CC: [email protected] <[email protected]>
=1B$B7oL>=1B(B: Re: BUG #16204: Fail to setup

=3D?iso-2022-jp?B?GyRCPi5OUxsoQiAbJEI5KhsoQg=3D=3D?=3D <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=3D'\''/var/lib/pgsql/10/data/'\'' --auth=3D'\''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

--_000_TYAPR01MB38852D852A730811ED8DC796DA350TYAPR01MB3885jpnp_
Content-Type: text/html; charset="iso-2022-jp"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-2022-=
jp">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
Thanks.</div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<br>
</div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<br>
</div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
&gt;<span style=3D"font-family: &quot;Yu Gothic UI&quot;, &quot;Meiryo UI&q=
uot;, Meiryo, &quot;MS Pgothic&quot;, Osaka, &quot;Segoe UI&quot;, -apple-s=
ystem, BlinkMacSystemFont, Roboto, &quot;Helvetica Neue&quot;, sans-serif; =
font-size: 14.6667px; color: rgb(0, 0, 0); background-color: rgb(255, 255, =
255); display: inline !important;">The
 Postgres project as such doesn't distribute systemd</span><br style=3D"fon=
t-family: &quot;Yu Gothic UI&quot;, &quot;Meiryo UI&quot;, Meiryo, &quot;MS=
 Pgothic&quot;, Osaka, &quot;Segoe UI&quot;, -apple-system, BlinkMacSystemF=
ont, Roboto, &quot;Helvetica Neue&quot;, sans-serif; font-size: 14.6667px; =
color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<span style=3D"font-family: &quot;Yu Gothic UI&quot;, &quot;Meiryo UI&quot;=
, Meiryo, &quot;MS Pgothic&quot;, Osaka, &quot;Segoe UI&quot;, -apple-syste=
m, BlinkMacSystemFont, Roboto, &quot;Helvetica Neue&quot;, sans-serif; font=
-size: 14.6667px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255)=
; display: inline !important;">&gt;service
 scripts, so you'll need to take this up with</span><br style=3D"font-famil=
y: &quot;Yu Gothic UI&quot;, &quot;Meiryo UI&quot;, Meiryo, &quot;MS Pgothi=
c&quot;, Osaka, &quot;Segoe UI&quot;, -apple-system, BlinkMacSystemFont, Ro=
boto, &quot;Helvetica Neue&quot;, sans-serif; font-size: 14.6667px; color: =
rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<span style=3D"font-family: &quot;Yu Gothic UI&quot;, &quot;Meiryo UI&quot;=
, Meiryo, &quot;MS Pgothic&quot;, Osaka, &quot;Segoe UI&quot;, -apple-syste=
m, BlinkMacSystemFont, Roboto, &quot;Helvetica Neue&quot;, sans-serif; font=
-size: 14.6667px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255)=
; display: inline !important;">&gt;whoever
 created the script you're using.</span></div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<span style=3D"font-family: &quot;Yu Gothic UI&quot;, &quot;Meiryo UI&quot;=
, Meiryo, &quot;MS Pgothic&quot;, Osaka, &quot;Segoe UI&quot;, -apple-syste=
m, BlinkMacSystemFont, Roboto, &quot;Helvetica Neue&quot;, sans-serif; font=
-size: 14.6667px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255)=
; display: inline !important;"><br>
</span></div>
<div style=3D"color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><=
span style=3D"font-size: 14.6667px;">Before I install postgresql-10 server,=
 it is no systemd unit file:</span></div>
<div style=3D"color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><=
span style=3D"font-size: 14.6667px;"><br>
</span></div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<span style=3D"font-family: &quot;Yu Gothic UI&quot;, &quot;Meiryo UI&quot;=
, Meiryo, &quot;MS Pgothic&quot;, Osaka, &quot;Segoe UI&quot;, -apple-syste=
m, BlinkMacSystemFont, Roboto, &quot;Helvetica Neue&quot;, sans-serif; font=
-size: 14.6667px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255)=
; display: inline !important;"><span>[root@tkw-pgcl-sv003
 ~]# ls -l /lib/systemd/system/posttgres*<br>
</span>
<div>ls: /lib/systemd/system/postgres* =1B$B$K%"%/%;%9$G$-$^$;$s=1B(B: =1B$=
B$=3D$N$h$&$J%U%!%$%k$d%G%#%l%/%H%j$O$"$j$^$;$s=1B(B<br>
</div>
<span></span><br>
</span></div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<span style=3D"font-family: &quot;Yu Gothic UI&quot;, &quot;Meiryo UI&quot;=
, Meiryo, &quot;MS Pgothic&quot;, Osaka, &quot;Segoe UI&quot;, -apple-syste=
m, BlinkMacSystemFont, Roboto, &quot;Helvetica Neue&quot;, sans-serif; font=
-size: 14.6667px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255)=
; display: inline !important;">But
 after install it be created:</span></div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<br>
</div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<span>[root@tkw-pgcl-sv003 ~]# ls -l /lib/systemd/system/postgres*<br>
</span>
<div>-rw-r--r--. 1 root root 1728 11=1B$B7n=1B(B 30 23:29 /lib/systemd/syst=
em/postgresql-10.service<br>
</div>
<div><br>
</div>
<span></span></div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<span>[root@tkw-pgcl-sv003 ~]# cat /lib/systemd/system/postgresql-10.servic=
e<br>
</span>
<div># It's not recommended to modify this file in-place, because it will b=
e<br>
</div>
<div># overwritten during package upgrades. &nbsp;If you want to customize,=
 the<br>
</div>
<div># best way is to create a file &quot;/etc/systemd/system/postgresql-10=
.service&quot;,<br>
</div>
<div># containing<br>
</div>
<div># .include /usr/lib/systemd/system/postgresql-10.service<br>
</div>
<div># ...make your changes here...<br>
</div>
<div># For more info about custom unit files, see<br>
</div>
<div># http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file=
.2F_add_a_custom_unit_file.3F<br>
</div>
<div><br>
</div>
<div># Note: changing PGDATA will typically require adjusting SELinux<br>
</div>
<div># configuration as well.<br>
</div>
<div><br>
</div>
<div># Note: do not use a PGDATA pathname containing spaces, or you will<br=
>
</div>
<div># break postgresql-setup.<br>
</div>
<div>[Unit]<br>
</div>
<div>Description=3DPostgreSQL 10 database server<br>
</div>
<div>Documentation=3Dhttps://www.postgresql.org/docs/10/static/<br>
</div>
<div>After=3Dsyslog.target<br>
</div>
<div>After=3Dnetwork.target<br>
</div>
<div><br>
</div>
<div>[Service]<br>
</div>
<div>Type=3Dnotify<br>
</div>
<div><br>
</div>
<div>User=3Dpostgres<br>
</div>
<div>Group=3Dpostgres<br>
</div>
<div><br>
</div>
<div># Note: avoid inserting whitespace in these Environment=3D lines, or y=
ou may<br>
</div>
<div># break postgresql-setup.<br>
</div>
<div><br>
</div>
<div># Location of database directory<br>
</div>
<div>Environment=3DPGDATA=3D/var/lib/pgsql/10/data/<br>
</div>
<div><br>
</div>
<div># Where to send early-startup messages from the server (before the log=
ging<br>
</div>
<div># options of postgresql.conf take effect)<br>
</div>
<div># This is normally controlled by the global default set by systemd<br>
</div>
<div># StandardOutput=3Dsyslog<br>
</div>
<div><br>
</div>
<div># Disable OOM kill on the postmaster<br>
</div>
<div>OOMScoreAdjust=3D-1000<br>
</div>
<div>Environment=3DPG_OOM_ADJUST_FILE=3D/proc/self/oom_score_adj<br>
</div>
<div>Environment=3DPG_OOM_ADJUST_VALUE=3D0<br>
</div>
<div><br>
</div>
<div>ExecStartPre=3D/usr/pgsql-10/bin/postgresql-10-check-db-dir ${PGDATA}<=
br>
</div>
<div>ExecStart=3D/usr/pgsql-10/bin/postmaster -D ${PGDATA}<br>
</div>
<div>ExecReload=3D/bin/kill -HUP $MAINPID<br>
</div>
<div>KillMode=3Dmixed<br>
</div>
<div>KillSignal=3DSIGINT<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div># Do not set any timeout value, so that systemd will not kill postmast=
er<br>
</div>
<div># during crash recovery.<br>
</div>
<div>TimeoutSec=3D0<br>
</div>
<div><br>
</div>
<div>[Install]<br>
</div>
<div>WantedBy=3Dmulti-user.target<br>
</div>
<span></span><br>
</div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<br>
</div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<br>
</div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<br>
</div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<br>
</div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<br>
</div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<br>
</div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<br>
</div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
The systemd unit file seems to derive from the rpm package the official sit=
e distributes.</div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
So where should I contact to solve this issue?</div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<br>
</div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<br>
</div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
I installed postgresql-10 server from the repository from official website:=
<br>
<a href=3D"https://yum.postgresql.org/repopackages.php" style=3D"">https://=
yum.postgresql.org/repopackages.php</a><br>
</div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<br>
</div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
And installed commands are:</div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<br>
</div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<span># yum -y install <a href=3D"https://downloareporpms/EL-7-x86_64/pgdg-=
redhat-repo-latest.noarch.rpm" style=3D"" id=3D"LPlnk865500">
https://downloareporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm</a><=
/span></div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<span>#&nbsp;yum -y install postgresql10-server postgresql10-contrib</span>=
</div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<span># mkdir /mnt/postgres</span></div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<span># mkdir /mnt/postgres/data</span></div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<span># chown postgres:postgres /mnt/postgres/data</span></div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<span><br>
</span></div>
<div style=3D"font-family: Meiryo, =1B$B%a%$%j%*=1B(B, &quot;Hiragino Sans&=
quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: =
rgb(255, 255, 255);">
<span><br>
</span><span></span>Best regards, Takumi Kobayashi</div>
<div id=3D"appendonsend"></div>
<hr style=3D"display:inline-block;width:98%" tabindex=3D"-1">
<div id=3D"divRplyFwdMsg" dir=3D"ltr"><font face=3D"Calibri, sans-serif" st=
yle=3D"font-size:11pt" color=3D"#000000"><b>=1B$B:9=3DP?M=1B(B:</b> Tom Lan=
e &lt;[email protected]&gt;<br>
<b>=1B$BAw?.F|;~=1B(B:</b> 2020=1B$BG/=1B(B1=1B$B7n=1B(B13=1B$BF|=1B(B 1:55=
<br>
<b>=1B$B08@h=1B(B:</b> =1B$B>.NS=1B(B =1B$B9*=1B(B &lt;[email protected]=
om&gt;<br>
<b>CC:</b> [email protected] &lt;[email protected].=
org&gt;<br>
<b>=1B$B7oL>=1B(B:</b> Re: BUG #16204: Fail to setup</font>
<div>&nbsp;</div>
</div>
<div class=3D"BodyFragment"><font size=3D"2"><span style=3D"font-size:11pt;=
">
<div class=3D"PlainText">=3D?iso-2022-jp?B?GyRCPi5OUxsoQiAbJEI5KhsoQg=3D=3D=
?=3D &lt;[email protected]&gt; writes:<br>
&gt; [root@tkw-pgcl-sv004 ~]# cat /var/lib/pgsql/10/initdb.log<br>
&gt; ...<br>
&gt; fixing permissions on existing directory /mnt/postgres/data ... ok<br>
&gt; ...<br>
&gt; Success. You can now start the database server using:<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; /usr/pgsql-10/bin/pg_ctl -D /mnt/postgres/data=
 -l logfile start<br>
<br>
Right.&nbsp; So, clearly, initdb thinks it was told to initialize<br>
/mnt/postgres/data.&nbsp; Looking back at your original trace,<br>
we see it being called like this:<br>
<br>
&#43; runuser -l postgres -c '/usr/pgsql-10/bin/initdb<br>
--pgdata=3D'\''/var/lib/pgsql/10/data/'\'' --auth=3D'\''ident'\''<br>
--data-checksums -E utf8 --no-locale -D /mnt/postgres/data'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^^^^^^^^=
^^^^^^^^^^^^^<br>
<br>
So evidently that won out over the earlier --pgdata switch,<br>
which is unsurprising.&nbsp; But it definitely looks like this<br>
service script is confused, or else you've put a -D switch<br>
into some option that's not supposed to contain that.<br>
<br>
The Postgres project as such doesn't distribute systemd<br>
service scripts, so you'll need to take this up with<br>
whoever created the script you're using.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; regards, to=
m lane<br>
</div>
</span></font></div>
</body>
</html>

--_000_TYAPR01MB38852D852A730811ED8DC796DA350TYAPR01MB3885jpnp_--