Re: BUG #16204: Fail to setup

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

Dear Tom

Thank you for your reply.

Yeah my guess seem to be wrong but the log says "Success" like this:

[root@tkw-pgcl-sv004 ~]# ls -l  /var/lib/pgsql/10/initdb.log
-rw-------. 1 postgres postgres 831  1=1B$B7n=1B(B 12 00:52 /var/lib/pgsql/=
10/initdb.log
[root@tkw-pgcl-sv004 ~]# cat /var/lib/pgsql/10/initdb.log
The files belonging to this database system will be owned by user "postgres=
".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default text search configuration will be set to "english".

Data page checksums are enabled.

fixing permissions on existing directory /mnt/postgres/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default timezone ... Asia/Tokyo
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

    /usr/pgsql-10/bin/pg_ctl -D /mnt/postgres/data -l logfile start

[root@tkw-pgcl-sv004 ~]#

And I have another hypothesis that
"The path used in postgresql-10-setup:L151,L158  is different from data pat=
h I set in the environment variable PGSETUP_INITDB_OPTION"

[root@tkw-pgcl-sv004 ~]# ls -l /var/lib/pgsql/10/data//PG_VERSION
ls: cannot access /var/lib/pgsql/10/data//PG_VERSION: No such file or direc=
tory

[root@tkw-pgcl-sv004 ~]# ls -l /mnt/postgres/data/PG_VERSION
-rw-------. 1 postgres postgres 3  1=1B$B7n=1B(B 12 00:52 /mnt/postgres/dat=
a/PG_VERSION
[root@tkw-pgcl-sv004 ~]# cat  /mnt/postgres/data/PG_VERSION
10

from: my log below, $PGDATA might not be set from the environment variable:

+ PGDATA=3D/var/lib/pgsql/10/data/
+ '[' x/var/lib/pgsql/10/data/ =3D x ']'
+ '[' -f /etc/systemd/system/postgresql-10.service ']'
+ '[' -f /usr/lib/systemd/system/postgresql-10.service ']'
+ SERVICE_FILE=3D/usr/lib/systemd/system/postgresql-10.service
+ PGUPLOG=3D/var/lib/pgsql/10/pgupgrade.log
+ PGLOG=3D/var/lib/pgsql/10/initdb.log


Is this some kind of bug or can I set data path not to default ?


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(B12=1B$BF|=1B(B 0:42
=1B$B08@h=1B(B: [email protected] <[email protected]>
CC: [email protected] <[email protected]>
=1B$B7oL>=1B(B: Re: BUG #16204: Fail to setup

PG Bug reporting form <[email protected]> writes:
> I installed postgresql10.11 and ran postgresql-10-setup but it fails.
> Maybe character $ for variable of PG_VERSION is missing in
> /usr/pgsql-10/bin/postgresql-10-setup below :

No, that guess is wrong.  The error message told you to look in
/var/lib/pgsql/10/initdb.log, so what does that file contain?

                        regards, tom lane

--_000_TYAPR01MB3885435554E6D2B1B12BC5CADA3A0TYAPR01MB3885jpnp_
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);">
Dear Tom</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);">
Thank you for your reply.</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);">
Yeah my guess seem to be wrong but the log says &quot;Success&quot; like th=
is:</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-sv004 ~]# ls -l &nbsp;/var/lib/pgsql/10/initdb.log<br>
</span>
<div>-rw-------. 1 postgres postgres 831 &nbsp;1=1B$B7n=1B(B 12 00:52 /var/=
lib/pgsql/10/initdb.log<br>
</div>
<span></span><span>[root@tkw-pgcl-sv004 ~]# cat /var/lib/pgsql/10/initdb.lo=
g<br>
</span>
<div>The files belonging to this database system will be owned by user &quo=
t;postgres&quot;.<br>
</div>
<div>This user must also own the server process.<br>
</div>
<div><br>
</div>
<div>The database cluster will be initialized with locale &quot;C&quot;.<br=
>
</div>
<div>The default text search configuration will be set to &quot;english&quo=
t;.<br>
</div>
<div><br>
</div>
<div>Data page checksums are enabled.<br>
</div>
<div><br>
</div>
<div>fixing permissions on existing directory /mnt/postgres/data ... ok<br>
</div>
<div>creating subdirectories ... ok<br>
</div>
<div>selecting default max_connections ... 100<br>
</div>
<div>selecting default shared_buffers ... 128MB<br>
</div>
<div>selecting default timezone ... Asia/Tokyo<br>
</div>
<div>selecting dynamic shared memory implementation ... posix<br>
</div>
<div>creating configuration files ... ok<br>
</div>
<div>running bootstrap script ... ok<br>
</div>
<div>performing post-bootstrap initialization ... ok<br>
</div>
<div>syncing data to disk ... ok<br>
</div>
<div><br>
</div>
<div>Success. You can now start the database server using:<br>
</div>
<div><br>
</div>
<div>&nbsp; &nbsp; /usr/pgsql-10/bin/pg_ctl -D /mnt/postgres/data -l logfil=
e start<br>
</div>
<div><br>
</div>
<span>[root@tkw-pgcl-sv004 ~]# </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);">
<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);">
And I have another hypothesis that</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);">
&quot;The path used in&nbsp;postgresql-10-setup:L151,L158&nbsp; is differen=
t from data path I set in the environment variable PGSETUP_INITDB_OPTION&qu=
ot;</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-sv004 ~]# ls -l /var/lib/pgsql/10/data//PG_VERSION<br>
</span>
<div>ls: cannot access /var/lib/pgsql/10/data//PG_VERSION: No such file or =
directory<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);">
<span>[root@tkw-pgcl-sv004 ~]# ls -l /mnt/postgres/data/PG_VERSION <br>
</span>
<div>-rw-------. 1 postgres postgres 3 &nbsp;1=1B$B7n=1B(B 12 00:52 /mnt/po=
stgres/data/PG_VERSION<br>
</div>
<div>[root@tkw-pgcl-sv004 ~]# cat &nbsp;/mnt/postgres/data/PG_VERSION <br>
</div>
<div>10<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);">
from: my log below, $PGDATA might not be set from the environment variable:=
</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>&#43; PGDATA=3D/var/lib/pgsql/10/data/<br>
</span>
<div>&#43; '[' x/var/lib/pgsql/10/data/ =3D x ']'<br>
</div>
<div>&#43; '[' -f /etc/systemd/system/postgresql-10.service ']'<br>
</div>
<div>&#43; '[' -f /usr/lib/systemd/system/postgresql-10.service ']'<br>
</div>
<div>&#43; SERVICE_FILE=3D/usr/lib/systemd/system/postgresql-10.service<br>
</div>
<div>&#43; PGUPLOG=3D/var/lib/pgsql/10/pgupgrade.log<br>
</div>
<span>&#43; PGLOG=3D/var/lib/pgsql/10/initdb.log</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);">
<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></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);">
Is this some kind of bug or can I set data path not to default ?</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);">
<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);">
Best regards, Takumi Kobayashi</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 id=3D"appendonsend"></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);">
<br>
</div>
<hr tabindex=3D"-1" style=3D"display:inline-block; width:98%">
<div id=3D"divRplyFwdMsg" dir=3D"ltr"><font face=3D"Calibri, sans-serif" co=
lor=3D"#000000" style=3D"font-size: 11pt;" data-ogsc=3D""><b>=1B$B:9=3DP?M=
=1B(B:</b> Tom Lane &lt;[email protected]&gt;<br>
<b>=1B$BAw?.F|;~=1B(B:</b> 2020=1B$BG/=1B(B1=1B$B7n=1B(B12=1B$BF|=1B(B 0:42=
<br>
<b>=1B$B08@h=1B(B:</b> [email protected] &lt;[email protected]&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">PG Bug reporting form &lt;[email protected]&g=
t; writes:<br>
&gt; I installed postgresql10.11 and ran postgresql-10-setup but it fails.<=
br>
&gt; Maybe character $ for variable of PG_VERSION is missing in<br>
&gt; /usr/pgsql-10/bin/postgresql-10-setup below :<br>
<br>
No, that guess is wrong.&nbsp; The error message told you to look in<br>
/var/lib/pgsql/10/initdb.log, so what does that file contain?<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_TYAPR01MB3885435554E6D2B1B12BC5CADA3A0TYAPR01MB3885jpnp_--