Thread: Initdb failure with PG 7.1.3 on RH 7.1...

Initdb failure with PG 7.1.3 on RH 7.1...

From
Paul Stavrides
Date:
Here is a wierd one...

Initdb is failing most of the time on RH 7.1.   Postgresql ver 7.1.3 and
7.1.2.

After building the PG from the source tarball, both 'make check' and the
actual install fail with the same symptoms.

I have been all over this.  Permissions are set correctly as far as I
can see--doing the install as user postgres.  I have gotten postgres to
install once in a while on this system in all my attempts, but cannot
reliably get it to work.  I am installing from sources since I need long
field names have have to change postgres_ext.h to accept longer field
names.  Although the install fails with the stock values.  No compile
errors of course.

Anybody got a clue?  I'm fresh out...

Thanks,

-paul


Here is the console output with debug on in initdb:

[postgres@redtop postgres]$ /usr/local/pgsql/bin/initdb -d -D -n
/usr/local/pgsql/data
Running with debug mode on.

Initdb variables:
  PGDATA=/usr/local/pgsql/data
  datadir=/usr/local/pgsql/share
  PGPATH=/usr/local/pgsql/bin
  TEMPFILE=/tmp/initdb.8184
  MULTIBYTE=
  MULTIBYTEID=0
  POSTGRES_SUPERUSERNAME=postgres
  POSTGRES_SUPERUSERID=504
  TEMPLATE1_BKI=/usr/local/pgsql/share/template1.bki
  GLOBAL_BKI=/usr/local/pgsql/share/global.bki
  TEMPLATE1_DESCR=/usr/local/pgsql/share/template1.description
  GLOBAL_DESCR=/usr/local/pgsql/share/global.description
  POSTGRESQL_CONF_SAMPLE=/usr/local/pgsql/share/postgresql.conf.sample
  PG_HBA_SAMPLE=/usr/local/pgsql/share/pg_hba.conf.sample
  PG_IDENT_SAMPLE=/usr/local/pgsql/share/pg_ident.conf.sample
This database system will be initialized with username "postgres".
This user will own all the data files and must also own the server process.

Fixing permissions on existing directory /usr/local/pgsql/data
Creating directory /usr/local/pgsql/data/base
Creating directory /usr/local/pgsql/data/global
Creating directory /usr/local/pgsql/data/pg_xlog
Creating template1 database in /usr/local/pgsql/data/base/1
Running: /usr/local/pgsql/bin/postgres -boot -x1 -C -F
-D/usr/local/pgsql/data -d template1
DEBUG:  database system was shut down at 2001-11-30 07:43:24 EST
DEBUG:  CheckPoint record at (0, 8)
DEBUG:  Redo record at (0, 8); Undo record at (0, 8); Shutdown TRUE
DEBUG:  NextTransactionId: 514; NextOid: 16384
DEBUG:  database system is in production state
Creating global relations in /usr/local/pgsql/data/global
Running: /usr/local/pgsql/bin/postgres -boot -C -F
-D/usr/local/pgsql/data -d template1
DEBUG:  database system was shut down at 2001-11-30 07:43:29 EST
DEBUG:  CheckPoint record at (0, 72)
DEBUG:  Redo record at (0, 72); Undo record at (0, 0); Shutdown TRUE
DEBUG:  NextTransactionId: 514; NextOid: 16384
DEBUG:  database system is in production state
Initializing pg_shadow.

initdb failed.
Removing temp file /tmp/initdb.8184.


If I turn on logging in postgres, I get the following log file:

DEBUG:  database system was shut down at 2001-11-29 17:02:43 EST
DEBUG:  CheckPoint record at (0, 136)
DEBUG:  Redo record at (0, 136); Undo record at (0, 0); Shutdown TRUE
DEBUG:  NextTransactionId: 514; NextOid: 16384
DEBUG:  database system is in production state
DEBUG:  connection: host=(null) user=postgres database=template1
DEBUG:  InitPostgres
FATAL 1:  cannot open /usr/local/pgsql/data/global/1262: No such file or
directory   <-- ?? !
FindExec: found "/usr/local/pgsql/bin/postgres" using argv[0]
DEBUG:  proc_exit(1)
DEBUG:  shmem_exit(1)
DEBUG:  shutting down
DEBUG:  database system is shut down
DEBUG:  exit(1)