Re: BUG #16204: Fail to setup

From: 小林 巧 <chamaharun(at)outlook(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 09:22:42
Message-ID: TYAPR01MB3885435554E6D2B1B12BC5CADA3A0@TYAPR01MB3885.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Dear Tom

Thank you for your reply.

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

[root(at)tkw-pgcl-sv004 ~]# ls -l /var/lib/pgsql/10/initdb.log
-rw-------. 1 postgres postgres 831 1月 12 00:52 /var/lib/pgsql/10/initdb.log
[root(at)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(at)tkw-pgcl-sv004 ~]#

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

[root(at)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 directory

[root(at)tkw-pgcl-sv004 ~]# ls -l /mnt/postgres/data/PG_VERSION
-rw-------. 1 postgres postgres 3 1月 12 00:52 /mnt/postgres/data/PG_VERSION
[root(at)tkw-pgcl-sv004 ~]# cat /mnt/postgres/data/PG_VERSION
10

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

+ PGDATA=/var/lib/pgsql/10/data/
+ '[' x/var/lib/pgsql/10/data/ = x ']'
+ '[' -f /etc/systemd/system/postgresql-10.service ']'
+ '[' -f /usr/lib/systemd/system/postgresql-10.service ']'
+ SERVICE_FILE=/usr/lib/systemd/system/postgresql-10.service
+ PGUPLOG=/var/lib/pgsql/10/pgupgrade.log
+ PGLOG=/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

________________________________
差出人: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
送信日時: 2020年1月12日 0:42
宛先: chamaharun(at)outlook(dot)com <chamaharun(at)outlook(dot)com>
CC: pgsql-bugs(at)lists(dot)postgresql(dot)org <pgsql-bugs(at)lists(dot)postgresql(dot)org>
件名: Re: BUG #16204: Fail to setup

PG Bug reporting form <noreply(at)postgresql(dot)org> 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2020-01-12 13:47:50 Re: BUG #16190: The usage of NULL pointer in refint.c
Previous Message Tom Lane 2020-01-11 15:42:35 Re: BUG #16204: Fail to setup