Thread: Problem with initdb

Problem with initdb

From
Frank Illner
Date:
hi,

i try to install the pgsql versin 7.3.4. on a new computer.

The installing steps where sucsessful:
./configure
gmake
su
gmake install
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres

when i try to create thr db-cluster with "/usr/local/pgsql/bin/initdb -D
/usr/local/pgsql/data"
the initdb-tool shows this:
----------------------------------------------------------------------------
--------------------------
postgres@sgs2:/usr/local/pgsql/bin> ./initdb -d -D /usr/local/pgsql/testdata
Running with debug mode on.

initdb variables:
  PGDATA=3D/usr/local/pgsql/testdata
  datadir=3D/usr/local/pgsql/share
  PGPATH=3D.
  ENCODING=3D
  ENCODINGID=3D0
  POSTGRES_SUPERUSERNAME=3Dpostgres
  POSTGRES_BKI=3D/usr/local/pgsql/share/postgres.bki
  POSTGRES_DESCR=3D/usr/local/pgsql/share/postgres.description
  POSTGRESQL_CONF_SAMPLE=3D/usr/local/pgsql/share/postgresql.conf.sample
  PG_HBA_SAMPLE=3D/usr/local/pgsql/share/pg_hba.conf.sample
  PG_IDENT_SAMPLE=3D/usr/local/pgsql/share/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 locales:
    COLLATE:  C CTYPE:   de_DE@euro     MESSAGES: C
    MONETARY: C NUMERIC: C      TIME:     C

creating directory /usr/local/pgsql/testdata... ok
creating directory /usr/local/pgsql/testdata/base... ok
creating directory /usr/local/pgsql/testdata/global... ok
creating directory /usr/local/pgsql/testdata/pg_xlog... ok
creating directory /usr/local/pgsql/testdata/pg_clog... ok
creating template1 database in /usr/local/pgsql/testdata/base/1... DEBUG:
invoking IpcMemoryCreate(size=3D983040)
LOG:  database system was shut down at 2004-01-16 17:50:01 CET
LOG:  checkpoint record is at 0/10
LOG:  redo record is at 0/10; undo record is at 0/10; shutdown TRUE
LOG:  next transaction id: 3; next oid: 16384
LOG:  database system is ready
DEBUG:  start transaction
DEBUG:  creating bootstrap relation pg_proc...
DEBUG:  column proname name
DEBUG:  column pronamespace oid
DEBUG:  column proowner int4
DEBUG:  column prolang oid
DEBUG:  column proisagg bool
DEBUG:  column prosecdef bool
DEBUG:  column proisstrict bool
DEBUG:  column proretset bool
DEBUG:  column provolatile char
DEBUG:  column pronargs int2
DEBUG:  column prorettype oid
DEBUG:  column proargtypes oidvector
DEBUG:  column prosrc text
DEBUG:  column probin bytea
DEBUG:  column proacl _aclitem
DEBUG:  commit transaction
DEBUG:  start transaction
DEBUG:  bootstrap relation created
DEBUG:  commit transaction
DEBUG:  start transaction
DEBUG:  inserting row with oid 1242...
DEBUG:  inserting column 0 value 'boolin'
DEBUG:  Typ =3D=3D NULL, typeindex =3D 3
./initdb: line 582:  9677 Segmentation fault      "$PGPATH"/postgres -boot
-x1 $PGSQL_OPT $BACKEND_TALK_ARG template1

initdb failed.
Removing /usr/local/pgsql/testdata.
----------------------------------------------------------------------------
--------------------------

Since three last month runs the same version on an other computer fine.=20
The mashines are running under "suse 8.2". It was never a problem...

The new computer is very fast with 2 proc 2.6 GHz, 2 GB Ram and
IDE-RAID-Set...but i think it should be a problem for the db.?

Please, can you help me??

best regards from germany

Frank Illner
____________________________________________________________

Teamleiter Enwicklung-Neue Medien / Abteilung IT
LAND BRANDENBURG LOTTO GmbH
Steinstra=DFe 104 - 106; 14480 Potsdam
Tel.: +49 (0) 331 / 64 56 424; Fax: +49 (0) 331 / 64 56 401
email: illner@lotto-brandenburg.de
visit http://www.lotto-brandenburg.de
____________________________________________________________

Re: Problem with initdb

From
Tom Lane
Date:
Frank Illner <Illner@lotto-brandenburg.de> writes:
> [ initdb fails on suse 8.2 ]

That seems quite odd.  I don't know what's going on, but I can suggest
how to find out.  Please rebuild with

    ./configure --enable-debug --enable-cassert

Then run the initdb with -n added to the command line.  The segfault
should then leave a "core" file in $PGDATA/base/1 (if not, try again
after doing "ulimit -c unlimited").  Then do

    $ gdb /path/to/postgres-executable $PGDATA/base/1/core
    gdb> bt
    gdb> quit

and send us gdb's output.

            regards, tom lane