Thread: BUG #14955: postgresql10-server-10.1-3PGDG.rhel6 initdb isssue
The following bug has been logged on the website: Bug reference: 14955 Logged by: Petar Barzakov Email address: peter.barzakov@gmail.com PostgreSQL version: 10.1 Operating system: COS6 Description: 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/ 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 .. /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 .. /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. 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". Data page checksums are disabled. 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 [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. 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". Data page checksums are disabled. 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 ~]# What is the issue: --- etc-postgresql10-server-10.1-2PGDG.rhel6.x86_64.rpm/rc.d/init.d/postgresql-10 2017-11-30 06:05:20.000000000 -0500 +++ etc-postgresql10-server-10.1-3PGDG.rhel6.x86_64.rpm/rc.d/init.d/postgresql-10 2017-12-07 14:37:26.000000000 -0500 @@ -250,7 +250,7 @@ initdbcmd="$PGENGINE/initdb --pgdata='$PGDATA' --auth='ident' $LOCALESTRING" initdbcmd+=" $PGSETUP_INITDB_OPTIONS" - $SU -l postgres -c "$initdbcmd" >> "\$PGLOG\" 2>&1 &" + $SU -l postgres -c "$initdbcmd >> \"$PGLOG\" 2>&1 &" # 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 ~]#
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: > > Bug reference: 14955 > Logged by: Petar Barzakov > Email address: peter.barzakov@gmail.com > PostgreSQL version: 10.1 > Operating system: COS6 > Description: > > 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/ > > > > 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 .. > > /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 .. > > /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. > > 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". > > Data page checksums are disabled. > > 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 > > [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. > > 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". > > Data page checksums are disabled. > > 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 ~]# > > > What is the issue: > --- > etc-postgresql10-server-10.1-2PGDG.rhel6.x86_64.rpm/rc.d/init.d/postgresql-10 > 2017-11-30 > 06:05:20.000000000 -0500 > +++ > etc-postgresql10-server-10.1-3PGDG.rhel6.x86_64.rpm/rc.d/init.d/postgresql-10 > 2017-12-07 > 14:37:26.000000000 -0500 > @@ -250,7 +250,7 @@ > initdbcmd="$PGENGINE/initdb --pgdata='$PGDATA' -- > auth='ident' > $LOCALESTRING" > initdbcmd+=" $PGSETUP_INITDB_OPTIONS" > > - $SU -l postgres -c "$initdbcmd" >> "\$PGLOG\" 2>&1 > &" > + $SU -l postgres -c "$initdbcmd >> \"$PGLOG\" 2>&1 &" > > # 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 ~]# > > > -- Devrim Gündüz EnterpriseDB: https://www.enterprisedb.com PostgreSQL Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR
Attachment
Hello,
The issue with initdb is fixed but the start is not putting postgres to back-ground:
How to reproduce:
root@localhost [~]# yum install -q -y https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-6-x86_64/pgdg-centos10-10-2.noarch.rpm
root@localhost [~]# yum -q -y install postgresql10 postgresql10-contrib postgresql10-devel postgresql10-libs postgresql10-server; echo $?
0
root@localhost [~]# rpm -qa |grep postgres
postgresql10-libs-10.1-4PGDG.rhel6.x86_64
postgresql10-10.1-4PGDG.rhel6.x86_64
postgresql10-devel-10.1-4PGDG.rhel6.x86_64
postgresql10-contrib-10.1-4PGDG.rhel6.x86_64
postgresql10-server-10.1-4PGDG.rhel6.x86_64
root@localhost [~]# /etc/init.d/postgresql-10 initdb
Initializing database: [ OK ]
root@localhost [~]# /etc/init.d/postgresql-10 start
Starting postgresql-10 service:
Log on a different console:
root@localhost [~]# ps axf
PID TTY STAT TIME COMMAND
--------------- cut --------------------
296 ? Ss 0:00 \_ sshd: root@pts/0
298 pts/0 Ss 0:00 | \_ -bash
314 pts/0 S 0:00 | \_ bash
545 pts/0 S+ 0:00 | \_ /bin/sh /etc/init.d/postgresql-10 start
558 pts/0 S+ 0:00 | \_ runuser -l postgres -c /usr/pgsql-10/bin/postmaster -D '/var/lib/pgsql/10/data' >>"/var/lib/pgsql/10/pgstartup.log" 2>&1
559 ? Ss 0:00 | \_ -bash -c /usr/pgsql-10/bin/postmaster -D '/var/lib/pgsql/10/data' >>"/var/lib/pgsql/10/pgstartup.log" 2>&1
572 ? S 0:00 | \_ /usr/pgsql-10/bin/postmaster -D /var/lib/pgsql/10/data
573 ? Ss 0:00 | \_ postgres: logger process
575 ? Ss 0:00 | \_ postgres: checkpointer process
576 ? Ss 0:00 | \_ postgres: writer process
577 ? Ss 0:00 | \_ postgres: wal writer process
578 ? Ss 0:00 | \_ postgres: autovacuum launcher process
579 ? Ss 0:00 | \_ postgres: stats collector process
580 ? Ss 0:00 | \_ postgres: bgworker: logical replication launcher
root@localhost [~]# ll -d /proc/545
dr-xr-xr-x 9 root root 0 Dec 11 03:33 /proc/545
root@localhost [~]# date
Mon Dec 11 03:38:51 EST 2017
The issue with initdb is fixed but the start is not putting postgres to back-ground:
How to reproduce:
root@localhost [~]# yum install -q -y https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-6-x86_64/pgdg-centos10-10-2.noarch.rpm
root@localhost [~]# yum -q -y install postgresql10 postgresql10-contrib postgresql10-devel postgresql10-libs postgresql10-server; echo $?
0
root@localhost [~]# rpm -qa |grep postgres
postgresql10-libs-10.1-4PGDG.rhel6.x86_64
postgresql10-10.1-4PGDG.rhel6.x86_64
postgresql10-devel-10.1-4PGDG.rhel6.x86_64
postgresql10-contrib-10.1-4PGDG.rhel6.x86_64
postgresql10-server-10.1-4PGDG.rhel6.x86_64
root@localhost [~]# /etc/init.d/postgresql-10 initdb
Initializing database: [ OK ]
root@localhost [~]# /etc/init.d/postgresql-10 start
Starting postgresql-10 service:
Log on a different console:
root@localhost [~]# ps axf
PID TTY STAT TIME COMMAND
--------------- cut --------------------
296 ? Ss 0:00 \_ sshd: root@pts/0
298 pts/0 Ss 0:00 | \_ -bash
314 pts/0 S 0:00 | \_ bash
545 pts/0 S+ 0:00 | \_ /bin/sh /etc/init.d/postgresql-10 start
558 pts/0 S+ 0:00 | \_ runuser -l postgres -c /usr/pgsql-10/bin/postmaster -D '/var/lib/pgsql/10/data' >>"/var/lib/pgsql/10/pgstartup.log" 2>&1
559 ? Ss 0:00 | \_ -bash -c /usr/pgsql-10/bin/postmaster -D '/var/lib/pgsql/10/data' >>"/var/lib/pgsql/10/pgstartup.log" 2>&1
572 ? S 0:00 | \_ /usr/pgsql-10/bin/postmaster -D /var/lib/pgsql/10/data
573 ? Ss 0:00 | \_ postgres: logger process
575 ? Ss 0:00 | \_ postgres: checkpointer process
576 ? Ss 0:00 | \_ postgres: writer process
577 ? Ss 0:00 | \_ postgres: wal writer process
578 ? Ss 0:00 | \_ postgres: autovacuum launcher process
579 ? Ss 0:00 | \_ postgres: stats collector process
580 ? Ss 0:00 | \_ postgres: bgworker: logical replication launcher
root@localhost [~]# ll -d /proc/545
dr-xr-xr-x 9 root root 0 Dec 11 03:33 /proc/545
root@localhost [~]# date
Mon Dec 11 03:38:51 EST 2017
Thank you.
Best Regards,
Petar Barzakov
On Mon, Dec 11, 2017 at 2:36 AM, Devrim Gündüz <devrim@gunduz.org> wrote:
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:
>
> Bug reference: 14955
> Logged by: Petar Barzakov
> Email address: peter.barzakov@gmail.com
> PostgreSQL version: 10.1
> Operating system: COS6
> Description:
>
> 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/
>
>
>
> 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 ..
>
> /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 ..
>
> /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.
>
> 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".
>
> Data page checksums are disabled.
>
> 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
>
> [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.
>
> 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".
>
> Data page checksums are disabled.
>
> 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 ~]#
>
>
> What is the issue:
> ---
> etc-postgresql10-server-10.1-2PGDG.rhel6.x86_64.rpm/rc.d/ init.d/postgresql-10
> 2017-11-30
> 06:05:20.000000000 -0500
> +++
> etc-postgresql10-server-10.1-3PGDG.rhel6.x86_64.rpm/rc.d/ init.d/postgresql-10
> 2017-12-07
> 14:37:26.000000000 -0500
> @@ -250,7 +250,7 @@
> initdbcmd="$PGENGINE/initdb --pgdata='$PGDATA' --
> auth='ident'
> $LOCALESTRING"
> initdbcmd+=" $PGSETUP_INITDB_OPTIONS"
>
> - $SU -l postgres -c "$initdbcmd" >> "\$PGLOG\" 2>&1
> &"
> + $SU -l postgres -c "$initdbcmd >> \"$PGLOG\" 2>&1 &"
>
> # 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 ~]#
>
>
>
--
Devrim Gündüz
EnterpriseDB: https://www.enterprisedb.com
PostgreSQL Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR
Hi, On Mon, 2017-12-11 at 10:40 +0200, Petar Barzakov wrote: > The issue with initdb is fixed but the start is not putting postgres to > back-ground: <snip> Apologies for the inconvenience, again. Fixed in 9.6.6-5. Regards, -- Devrim Gündüz EnterpriseDB: https://www.enterprisedb.com PostgreSQL Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR
Attachment
Hello,
Thank you, everything is fine with 9.6 and 10.1.Best Regards,
Petar Barzakov
On Tue, Dec 12, 2017 at 1:48 AM, Devrim Gündüz <devrim@gunduz.org> wrote:
Hi,
On Mon, 2017-12-11 at 10:40 +0200, Petar Barzakov wrote:
> The issue with initdb is fixed but the start is not putting postgres to
> back-ground:
<snip>
Apologies for the inconvenience, again.
Fixed in 9.6.6-5.
Regards,--
Devrim Gündüz
EnterpriseDB: https://www.enterprisedb.com
PostgreSQL Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR