On Jun 27 1998 , Oliver Elphick wrote: > To find out what is going wrong with initdb: > Edit /usr/lib/postgresql/bin/initdb and add the line `set +x' after the > first line. Then become root and run the initialisation command (this > is all one line): > su - postgres -c "PATH=$PATH:/usr/lib/postgresql/bin; initdb -l > /usr/lib/postgresql/lib -r /var/postgres/data -u postgres" >
Entering the initialization command, as you suggested, %% su - postgres -c "path=$path:/usr/lib/postgresql/bin; initdb -l /usr/lib/postgresql/lib -r /var/postgres/data -u postgres" yields no output, even after adding 'set +x' at the second line of initdb script. The command executes silently, but, as a result, postgres server was not running. To make initdb talk, i assigned postgres a password and bash shell, then su postgres and entered the initialization line: %% su postgres $ PATH=/bin:/sbin/:/usr/bin/:usr/sbin:/usr/lib/postgresql/bin $ initdb -l /usr/lib/postgresql/lib -r /var/postgres/data -u postgres > initdb: using /usr/lib/postgresql/lib/local1_template1.bki.source as \ input to create the template database. > initdb: using /usr/lib/postgresql/lib/global1.bki.source as input to \ create the global classes. > initdb: using /usr/lib/postgresql/lib/pg_hba.conf.sample as the \ host-based authentication control file. > > We are initializing the database system with username postgres (uid=100). > This user will own all the files and must also own the server process. > rm: /var/postgres/data/base/template1: Permission denied > mkdir: cannot make directory `/var/postgres/data/base/template1': \ Permission denied > initdb: creating template database in /var/postgres/data/base/template1 > Running: postgres -boot -C -F -D/var/postgres/data -Q template1 > ERROR: cannot create pg_proc > ERROR: cannot create pg_proc > /usr/lib/postgresql/bin/initdb: line 269: 15069 Broken pipe \ cat $TEMPLATE > 15070 | sed -e "s/postgres \ PGUID/$POSTGRES_SUPERUSERNAME $POSTGRES_SUPERUID/" -e \ "s/PGUID/$POSTGRES_SUPERUID/" > 15071 Segmentation fault | postgres $BACKENDARGS template1 > initdb: could not create template database > initdb: cleaning up by wiping out /var/postgres/data/base/template1 > rm: /var/postgres/data/base/template1: Permission denied It seemed a write-permission denial in /var/postgres sub-tree. Therefore i switched back to root and changed the owner of /var/postgres: %% chown -R postgres.postgres /var/postgres This time postgres user was able to complete the initiatization script. I was able to create users allowed to access and change databases, so i think postgres is running correctly now. Yet i had to start postmaster by line command; i noticed that postgres directive is not contained in /etc/rc*.d/ directories. Is it a desired feature or is it due to my non-orthodox installation procedure? In any case, thank you for your help Paolo Pumilia --- cstc - -- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]