Thread: Initdb error without much more details PostgreSQL 7.4.19
Hello, I'm facing a trouble with the initdb execution of PostgreSQL 7.4.19 on a Re= dhat 4 : [uname -a] Linux <host> 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i6= 86 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 J= an 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=3D/var/lib/pgsql/data datadir=3D/usr/share/pgsql PGPATH=3D/usr/bin ENCODING=3D ENCODINGID=3D0 POSTGRES_SUPERUSERNAME=3Dpostgres POSTGRES_BKI=3D/usr/share/pgsql/postgres.bki POSTGRES_DESCR=3D/usr/share/pgsql/postgres.description POSTGRESQL_CONF_SAMPLE=3D/usr/share/pgsql/postgresql.conf.sample PG_HBA_SAMPLE=3D/usr/share/pgsql/pg_hba.conf.sample PG_IDENT_SAMPLE=3D/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=3D<targeted_folder> datadir=3D/usr/share/pgsql PGPATH=3D/usr/bin ENCODING=3D ENCODINGID=3D0 POSTGRES_SUPERUSERNAME=3Dpostgres POSTGRES_BKI=3D/usr/share/pgsql/postgres.bki POSTGRES_DESCR=3D/usr/share/pgsql/postgres.description POSTGRESQL_CONF_SAMPLE=3D/usr/share/pgsql/postgresql.conf.sample PG_HBA_SAMPLE=3D/usr/share/pgsql/pg_hba.conf.sample PG_IDENT_SAMPLE=3D/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 s= cript ? Is there anybody able to understand this failure ?=20 Why default max_connections and shared_buffers are not the same ? -- Laurent _________________________________________________________________ Comme 9 millions de fran=E7ais, cr=E9ez un compte Hotmail ! http://www.windowslive.fr/hotmail/default.asp=
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
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=20 > Date: Thu, 21 Feb 2008 11:49:04 -0500 > From: tgl@sss.pgh.pa.us >=20 > Laurent Barbier writes: >> I'm facing a trouble with the initdb execution of PostgreSQL 7.4.19 on a= Redhat 4 : >=20 > Looks like SELinux problems to me. Does it work after doing "setenforce = 0"? >=20 >> 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 >=20 > 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. >=20 > regards, tom lane >=20 > ---------------------------(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=E9n=E9ration. Cr=E9ez u= n compte.=20 http://www.windowslive.fr/hotmail/default.asp