Thread: initdb and version 7

initdb and version 7

From
michael
Date:
I'm having problems running initdb with version 7.0. I am doing what I
normally do after compiler and installing previous versions, but it's
failing during initdb, and that's not happened before.. Here's the
console dump.

$ 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
|
"$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.

Re: [BUGS] initdb and version 7

From
Peter Eisentraut
Date:
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

Re: [BUGS] initdb and version 7

From
michael
Date:
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.

Re: [BUGS] initdb and version 7

From
Peter Eisentraut
Date:
> $ 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