Initdb error without much more details PostgreSQL 7.4.19

Started by Laurent Barbierabout 18 years ago3 messagesbugs
Jump to latest
#1Laurent Barbier
barbierlaurent@hotmail.fr

Hello,

I'm facing a trouble with the initdb execution of PostgreSQL 7.4.19 on a Redhat 4 :
[uname -a] Linux <host> 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux
[cat /proc/version] Linux version 2.6.9-5.ELsmp (bhcompile@decompose.build.redhat.com) (gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)) #1 SMP Wed Jan 5 19:30:39 EST 2005
[cat /etc/redhat-release] Red Hat Enterprise Linux ES release 4 (Nahant)

Then i install PostgreSQL binary in the order :
rpm -ivh postgresql-libs-7.4.19-1PGDG.rhel4.i686.rpm
rpm -ivh postgresql-7.4.19-1PGDG.rhel4.i686.rpm

rpm -ivh postgresql-server-7.4.19-1PGDG.rhel4.i686.rpm

Then I execute initdb with the user postgres :
-bash-3.00$ initdb -d
Running in debug mode.

initdb: internal variables:
PGDATA=/var/lib/pgsql/data
datadir=/usr/share/pgsql
PGPATH=/usr/bin
ENCODING=
ENCODINGID=0
POSTGRES_SUPERUSERNAME=postgres
POSTGRES_BKI=/usr/share/pgsql/postgres.bki
POSTGRES_DESCR=/usr/share/pgsql/postgres.description
POSTGRESQL_CONF_SAMPLE=/usr/share/pgsql/postgresql.conf.sample
PG_HBA_SAMPLE=/usr/share/pgsql/pg_hba.conf.sample
PG_IDENT_SAMPLE=/usr/share/pgsql/pg_ident.conf.sample
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 fr_FR.UTF-8.

fixing permissions on existing directory /var/lib/pgsql/data... ok
creating directory /var/lib/pgsql/data/base... ok
creating directory /var/lib/pgsql/data/global... ok
creating directory /var/lib/pgsql/data/pg_xlog... ok
creating directory /var/lib/pgsql/data/pg_clog... ok
selecting default max_connections... 100
selecting default shared_buffers... 1000
creating configuration files... ok
creating template1 database in /var/lib/pgsql/data/base/1... ok
initializing pg_shadow... ok
enabling unlimited row size for system tables... ok
initializing pg_depend... ok
creating system views... ok
loading pg_description... ok
creating conversions... ok
setting privileges on built-in objects... ok
creating information schema...
initdb: failed

And I need to install the cluster on another path, the result is even worst :
-bash-3.00$ initdb -d -D <targeted_folder>
Running in debug mode.

initdb: internal variables:
PGDATA=<targeted_folder>
datadir=/usr/share/pgsql
PGPATH=/usr/bin
ENCODING=
ENCODINGID=0
POSTGRES_SUPERUSERNAME=postgres
POSTGRES_BKI=/usr/share/pgsql/postgres.bki
POSTGRES_DESCR=/usr/share/pgsql/postgres.description
POSTGRESQL_CONF_SAMPLE=/usr/share/pgsql/postgresql.conf.sample
PG_HBA_SAMPLE=/usr/share/pgsql/pg_hba.conf.sample
PG_IDENT_SAMPLE=/usr/share/pgsql/pg_ident.conf.sample
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 fr_FR.UTF-8.

fixing permissions on existing directory <targeted_folder>... ok
creating directory <targeted_folder>/base... ok
creating directory <targeted_folder>/global... ok
creating directory <targeted_folder>/pg_xlog... ok
creating directory <targeted_folder>/pg_clog... ok
selecting default max_connections... 10
selecting default shared_buffers... 50
creating configuration files... ok
creating template1 database in <targeted_folder>/base/1...
initdb: failed

I am really stuck ... even trying to execute step by step the initdb bash script ?

Is there anybody able to understand this failure ?
Why default max_connections and shared_buffers are not the same ?

--
Laurent

_________________________________________________________________
Comme 9 millions de français, créez un compte Hotmail !
http://www.windowslive.fr/hotmail/default.asp

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Laurent Barbier (#1)
Re: Initdb error without much more details PostgreSQL 7.4.19

Laurent Barbier <barbierlaurent@hotmail.fr> writes:

I'm facing a trouble with the initdb execution of PostgreSQL 7.4.19 on a Redhat 4 :

Looks like SELinux problems to me. Does it work after doing "setenforce 0"?

Then i install PostgreSQL binary in the order :
rpm -ivh postgresql-libs-7.4.19-1PGDG.rhel4.i686.rpm
rpm -ivh postgresql-7.4.19-1PGDG.rhel4.i686.rpm

You might try Red Hat's RPMs instead --- they contain fixes for some
selinux issues, which AFAICT never got propagated into the PGDG RPMs.
Also, make sure you are up to date with the latest selinux policy
RPM. Or you could just leave selinux turned off, but that might not
be a great idea from a security standpoint.

regards, tom lane

#3Laurent Barbier
barbierlaurent@hotmail.fr
In reply to: Tom Lane (#2)
Re: Initdb error without much more details PostgreSQL 7.4.19

Thanks a lot Tom,

It works without the security enhanced functionality ! So, I didn't try the Red Hat's RPMs.

Best regards,

--
Laurent

----------------------------------------

To: barbierlaurent@hotmail.fr
CC: pgsql-bugs@postgresql.org
Subject: Re: [BUGS] Initdb error without much more details PostgreSQL 7.4.19
Date: Thu, 21 Feb 2008 11:49:04 -0500
From: tgl@sss.pgh.pa.us

Laurent Barbier writes:

I'm facing a trouble with the initdb execution of PostgreSQL 7.4.19 on a Redhat 4 :

Looks like SELinux problems to me. Does it work after doing "setenforce 0"?

Then i install PostgreSQL binary in the order :
rpm -ivh postgresql-libs-7.4.19-1PGDG.rhel4.i686.rpm
rpm -ivh postgresql-7.4.19-1PGDG.rhel4.i686.rpm

You might try Red Hat's RPMs instead --- they contain fixes for some
selinux issues, which AFAICT never got propagated into the PGDG RPMs.
Also, make sure you are up to date with the latest selinux policy
RPM. Or you could just leave selinux turned off, but that might not
be a great idea from a security standpoint.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

_________________________________________________________________
Votre contact a choisi Hotmail, l'e-mail nouvelle génération. Créez un compte.
http://www.windowslive.fr/hotmail/default.asp