Re: [BUGS] initdb and version 7

Started by Peter Eisentrautabout 26 years ago3 messagesbugs
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

Platform, shell version, configure options? Details, man! ;)

On Wed, 1 Mar 2000, michael wrote:

$ initdb --pgdata=/usr/local/pgsql.db
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 pre-existing data directory //usr/local/pgsql.db
Creating database system directory /usr/local/pgsql.db/base Creating
database XLOG directory /usr/local/pgsql.db/pg_xlog Creating template
database in /usr/local/pgsql.db/base/template1
/usr/local/pgsql/bin/initdb: line 441: 338 Broken pipe cat "$TEMPLATE"
339 | sed -e "s/PGUID//$POSTGRES_SUPERUSERID/g" 340 Segmentation fault

^^
Ay, there's the rub. (I think.) This might make sed puke, though surely
not very socially friendly. Try removing this double backslash in initdb.

Alternatively, try removing any old or new postgres out of your path and
starting initdb with a full directory specification.

|
"$PGPATH"/postgres $FIRSTRUN template1 initdb failed. Removing
/usr/local/pgsql.db. rm: cannot remove directory
&pi0;/usr/local/pgsql.db': Permission denied Failed. Removing temp file
/tmp/initdb.316.

--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden

#2Michael Andreasen
michael@systems.to
In reply to: Peter Eisentraut (#1)

Sorry, I don't know where that double slash came from? must have come
when cutting and pasting the message, it's not really in the error.

Here's my setup and the "correct" message.

Debian linux
kernel 2.2.12
glibc 2.1.2
shell bash 2.01.1
./configure with no special opts

$ initdb --pgdata=/usr/local/pgsql.db
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 pre-existing data directory /usr/local/pgsql.db
Creating database system directory /usr/local/pgsql.db/base
Creating database XLOG directory /usr/local/pgsql.db/pg_xlog
Creating template database in /usr/local/pgsql.db/base/template1
/usr/local/pgsql/bin/initdb: line 441: ��� 282 Broken pipe ��� ��� ��� ��� ��� ��� cat
"$TEMPL
ATE"
��� ��� ��� 283 ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� | sed -e "s/PGUID/$POSTGRES_SUPERUSERID/g"
��� ��� ��� 284 Segmentation fault ������ ��� | "$PGPATH"/postgres $FIRSTRUN
template1

initdb failed.
Removing /usr/local/pgsql.db.
rm: cannot remove directory &pi0;/usr/local/pgsql.db': Permission denied
Failed.
Removing temp file /tmp/initdb.260.

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Michael Andreasen (#2)

$ initdb --pgdata=/usr/local/pgsql.db

Creating template database in /usr/local/pgsql.db/base/template1
/usr/local/pgsql/bin/initdb: line 441: � 282 Broken pipe � � � � � � cat
"$TEMPL
ATE"
� � � 283 � � � � � � � � � � � | sed -e "s/PGUID/$POSTGRES_SUPERUSERID/g"
� � � 284 Segmentation fault �� � | "$PGPATH"/postgres $FIRSTRUN
template1

Beats me. If there's a segfault, maybe there's a core file? If so it might
help to know which program core dumps (run 'file core'). If it's postgres,
maybe you can show a stack backtrace (run 'gdb postgres core' and enter
'bt'), otherwise it's outside our jurisdiction. :)

--
Peter Eisentraut Sernanders v�g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden