Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iqgWJ-0003MC-FW for pgsql-bugs@arkaria.postgresql.org; Sun, 12 Jan 2020 16:55:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iqgWI-0007Hi-4g for pgsql-bugs@arkaria.postgresql.org; Sun, 12 Jan 2020 16:55:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iqgWH-0007HZ-Sk for pgsql-bugs@lists.postgresql.org; Sun, 12 Jan 2020 16:55:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iqgWE-00022A-UJ for pgsql-bugs@lists.postgresql.org; Sun, 12 Jan 2020 16:55:21 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 00CGtDff013632; Sun, 12 Jan 2020 11:55:13 -0500 From: Tom Lane To: =?iso-2022-jp?B?GyRCPi5OUxsoQiAbJEI5KhsoQg==?= cc: "pgsql-bugs@lists.postgresql.org" Subject: Re: BUG #16204: Fail to setup In-reply-to: References: <16204-d78de1072fe55ae4@postgresql.org>,<32050.1578757355@sss.pgh.pa.us> Comments: In-reply-to =?iso-2022-jp?B?GyRCPi5OUxsoQiAbJEI5KhsoQg==?= message dated "Sun, 12 Jan 2020 09:22:42 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13630.1578848113.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 12 Jan 2020 11:55:13 -0500 Message-ID: <13631.1578848113@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =3D?iso-2022-jp?B?GyRCPi5OUxsoQiAbJEI5KhsoQg=3D=3D?=3D 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