Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eOC54-0003qs-Kx for pgsql-bugs@arkaria.postgresql.org; Mon, 11 Dec 2017 00:36:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eOC52-0003ZI-Q5 for pgsql-bugs@arkaria.postgresql.org; Mon, 11 Dec 2017 00:36:24 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eOC52-0003Z8-H7 for pgsql-bugs@lists.postgresql.org; Mon, 11 Dec 2017 00:36:24 +0000 Received: from ns5.gunduz.org ([107.170.136.15] helo=ns1.gunduz.org) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eOC4u-0005Yw-UK for pgsql-bugs@postgresql.org; Mon, 11 Dec 2017 00:36:22 +0000 Received: from asus-laptop04.gunduz.org (unknown [88.237.199.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ns1.gunduz.org (Postfix) with ESMTPSA id 98AFD3FD5C; Mon, 11 Dec 2017 00:36:13 +0000 (UTC) Message-ID: <1512952569.19931.48.camel@gunduz.org> Subject: Re: BUG #14955: postgresql10-server-10.1-3PGDG.rhel6 initdb isssue From: Devrim =?ISO-8859-1?Q?G=FCnd=FCz?= To: peter.barzakov@gmail.com, pgsql-bugs@postgresql.org Date: Mon, 11 Dec 2017 03:36:09 +0300 In-Reply-To: <20171208125855.21691.22528@wrigleys.postgresql.org> References: <20171208125855.21691.22528@wrigleys.postgresql.org> X-Priority: 1 Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-RwNn7SvlTkIupcy7l4Tr" X-Mailer: Evolution 3.26.2 (3.26.2-1.fc27) Mime-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --=-RwNn7SvlTkIupcy7l4Tr Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Thanks for the report. Pushed 10.1-4 RPMs to RHEL 6 repo, which fixes this issue. Apologies for the inconvenience. Regards, Devrim On Fri, 2017-12-08 at 12:58 +0000, peter.barzakov@gmail.com wrote: > The following bug has been logged on the website: >=20 > Bug reference: 14955 > Logged by: Petar Barzakov > Email address: peter.barzakov@gmail.com > PostgreSQL version: 10.1 > Operating system: COS6 > Description: =20 >=20 > How to reproduce: > rpm -qa |grep postgres > ls -alh /var/lib/pgsql* > yum -q -y install postgresql10 postgresql10-contrib postgresql10-devel > postgresql10-libs postgresql10-server; echo $? > rpm -qa |grep postgres > ls -alh /var/lib/pgsql* > rpm -qf /var/lib/pgsql/10/data/ > ls -alh /var/lib/pgsql/10/*/ > /etc/init.d/postgresql-10 initdb > ls -alh /var/lib/pgsql/10/*/ > ls -alh /var/lib/pgsql/10/ > cat /var/lib/pgsql/10/pgstartup.log > rm -rf /var/lib/pgsql/10/data > ls -alh /var/lib/pgsql/10/*/ > ls -alh /var/lib/pgsql/10/ >=20 >=20 >=20 > Issue: > [root@localhost ~]# rpm -qa |grep postgres > [root@localhost ~]# ls -alh /var/lib/pgsql* > ls: cannot access /var/lib/pgsql*: No such file or directory > [root@localhost ~]# yum -q -y install postgresql10 postgresql10-contrib > postgresql10-devel postgresql10-libs postgresql10-server; echo $? > 0 > [root@localhost ~]# rpm -qa |grep postgres > postgresql10-10.1-3PGDG.rhel6.x86_64 > postgresql10-server-10.1-3PGDG.rhel6.x86_64 > postgresql10-libs-10.1-3PGDG.rhel6.x86_64 > postgresql10-devel-10.1-3PGDG.rhel6.x86_64 > postgresql10-contrib-10.1-3PGDG.rhel6.x86_64 > [root@localhost ~]# ls -alh /var/lib/pgsql* > total 16K > drwx------ 3 postgres postgres 4.0K Dec 8 07:53 . > drwxr-xr-x 13 root root 4.0K Dec 8 07:53 .. > drwx------ 4 postgres postgres 4.0K Dec 8 07:53 10 > -rwx------ 1 postgres postgres 266 Dec 8 07:53 .bash_profile > [root@localhost ~]# rpm -qf /var/lib/pgsql/10/data/ > postgresql10-server-10.1-3PGDG.rhel6.x86_64 > [root@localhost ~]# ls -alh /var/lib/pgsql/10/*/ > /var/lib/pgsql/10/backups/: > total 8.0K > drwx------ 2 postgres postgres 4.0K Dec 7 14:37 . > drwx------ 4 postgres postgres 4.0K Dec 8 07:53 .. >=20 > /var/lib/pgsql/10/data/: > total 8.0K > drwx------ 2 postgres postgres 4.0K Dec 7 14:37 . > drwx------ 4 postgres postgres 4.0K Dec 8 07:53 .. > [root@localhost ~]# /etc/init.d/postgresql-10 initdb > Initializing database: [FAILED] > [root@localhost ~]# ls -alh /var/lib/pgsql/10/*/ > /var/lib/pgsql/10/backups/: > total 8.0K > drwx------ 2 postgres postgres 4.0K Dec 7 14:37 . > drwx------ 4 postgres postgres 4.0K Dec 8 07:53 .. >=20 > /var/lib/pgsql/10/data/: > total 12K > drwx------ 3 postgres postgres 4.0K Dec 8 07:53 . > drwx------ 4 postgres postgres 4.0K Dec 8 07:53 .. > drwx------ 2 postgres postgres 4.0K Dec 8 07:53 log > [root@localhost ~]# ls -alh /var/lib/pgsql/10/ > total 16K > drwx------ 4 postgres postgres 4.0K Dec 8 07:53 . > drwx------ 3 postgres postgres 4.0K Dec 8 07:53 .. > drwx------ 2 postgres postgres 4.0K Dec 7 14:37 backups > drwx------ 3 postgres postgres 4.0K Dec 8 07:53 data > -rw------- 1 postgres postgres 0 Dec 8 07:53 pgstartup.log > [root@localhost ~]# cat /var/lib/pgsql/10/pgstartup.log > The files belonging to this database system will be owned by user > "postgres". > This user must also own the server process. >=20 > The database cluster will be initialized with locale "en_US.UTF-8". > The default database encoding has accordingly been set to "UTF8". > The default text search configuration will be set to "english". >=20 > Data page checksums are disabled. >=20 > initdb: directory "/var/lib/pgsql/10/data" exists but is not empty > If you want to create a new database system, either remove or empty > the directory "/var/lib/pgsql/10/data" or run initdb > with an argument other than "/var/lib/pgsql/10/data". > [root@localhost ~]# rm -rf /var/lib/pgsql/10/data > [root@localhost ~]# ls -alh /var/lib/pgsql/10/*/ > total 8.0K > drwx------ 2 postgres postgres 4.0K Dec 7 14:37 . > drwx------ 3 postgres postgres 4.0K Dec 8 07:53 .. > [root@localhost ~]# ls -alh /var/lib/pgsql/10/ > total 16K > drwx------ 3 postgres postgres 4.0K Dec 8 07:53 . > drwx------ 3 postgres postgres 4.0K Dec 8 07:53 .. > drwx------ 2 postgres postgres 4.0K Dec 7 14:37 backups > -rw------- 1 postgres postgres 599 Dec 8 07:53 pgstartup.log >=20 > [root@localhost ~]# rm -rf /var/lib/pgsql/10/ > [root@localhost ~]# /etc/init.d/postgresql-10 initdb > Initializing database: [FAILED] > [root@localhost ~]# cat /var/lib/pgsql/10/pgstartup.log > The files belonging to this database system will be owned by user > "postgres". > This user must also own the server process. >=20 > The database cluster will be initialized with locale "en_US.UTF-8". > The default database encoding has accordingly been set to "UTF8". > The default text search configuration will be set to "english". >=20 > Data page checksums are disabled. >=20 > initdb: directory "/var/lib/pgsql/10/data" exists but is not empty > If you want to create a new database system, either remove or empty > the directory "/var/lib/pgsql/10/data" or run initdb > with an argument other than "/var/lib/pgsql/10/data". > [root@localhost ~]#=20 >=20 >=20 > What is the issue: > --- > etc-postgresql10-server-10.1-2PGDG.rhel6.x86_64.rpm/rc.d/init.d/postgresq= l-10 > 2017-11-30 > 06:05:20.000000000 -0500 > +++ > etc-postgresql10-server-10.1-3PGDG.rhel6.x86_64.rpm/rc.d/init.d/postgresq= l-10 > 2017-12-07 > 14:37:26.000000000 -0500 > @@ -250,7 +250,7 @@ > initdbcmd=3D"$PGENGINE/initdb --pgdata=3D'$PGDATA' -- > auth=3D'ident' > $LOCALESTRING" > initdbcmd+=3D" $PGSETUP_INITDB_OPTIONS" > =20 > - $SU -l postgres -c "$initdbcmd" >> "\$PGLOG\" 2>&1 > &" > + $SU -l postgres -c "$initdbcmd >> \"$PGLOG\" 2>&1 &" > =20 > # Create directory for postmaster log > mkdir "$PGDATA/log" > @@ -340,7 +340,7 @@ > su -l postgres -c "$PGENGINE/pg_upgrade \ > -b /usr/pgsql-$PGPREVMAJORVERSION/bin/ -B $PGENGINE/ \ > -d $OLDPGDATA -D $NEWPGDATA \ > - -p $OLDPGPORT -P $NEWPGPORT" >> "$PGUPLOG" 2>&1 & > + -p $OLDPGPORT -P $NEWPGPORT >> \"$PGUPLOG\" 2>&1 &" > else > echo "Cluster check failed. Please see the output above." > exit 1 > [root@localhost ~]#=20 >=20 >=20 >=20 --=20 Devrim G=C3=BCnd=C3=BCz EnterpriseDB: https://www.enterprisedb.com PostgreSQL Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR --=-RwNn7SvlTkIupcy7l4Tr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEH8GKHNUOKtDEiyD22MM9/pLPbrUFAlot0vkACgkQ2MM9/pLP brWVvhAAj3UxJFvSslbaEZHUz7RMXJKWil+Y/pTEACVyNbKu7G34bPQpdNjjw5bi fzvHLAd+BZbkOAcCDhuh78aMSFGWMelcPm72W234I0JVqqmqaf1Swyypfz6IyVe+ oUVgaR3NnARaA8vDYy6maPLrA1+hrHaRLs146t43fz4pQzq8jaCgxk+vMJAENUJJ HPBC6Y3fN3IchL2/f7rm6rVPn6X31+Ik3ssCmFxsZeXD6eWv9MWdgPdN0PSba5qy wKkyFI6Ew+SoeEoaikAxAo348AlPOD7UBhsyLS5vB77lUMOEqMzQf0e2Hv0YLl/c 7Qq/s6hcQs5BlFfr/8A4p/9fLKdUSyhSC0/WqvkdISUVBcS91+sHN2Ay9pAEtzxd PlwEYFlAbls34OvW89aYF6OGF5egdxh42FqAVxFTpNWhA8Y80ln/nKs78voixdti hOwve+en+NzhqcO17qFdvzB3F/SrgQ1oHBDdAIqjGD//l3EN2J3aeH4LHVdFS3Tl Ft8js+0mBNc6p0YGmr66WUSvHqgW4VSw4hP944i8+74/MTTi0YHcm3m67nDtULXY kIFUGjBswxb8NrpBz9lwNpIugFQ23lYD2a4gguTErJXUfTAZXd+NbkY36ZFb3XMF OnyBe6bzRv60kYYqk/bIRCDH1yvRe+waWjA6Lnmhh5DGkBynZCw= =pSOI -----END PGP SIGNATURE----- --=-RwNn7SvlTkIupcy7l4Tr--