Re: INIT DB FAILURE

Started by Mike Milleralmost 25 years ago3 messages
#1Mike Miller
temp6453@hotmail.com

mv global.bki global.bki.old; mv template1.bki template1.bki.old
cat global.bki.old | sed s/" ame"/" name"/ > global.bki
cat template1.bki.old | sed s/" ame"/" name"/ > global.bki

Solution is pretty simple actually (did figure this one out). I did find
other people complaining about this, but no solutions. But I just did the
install on an older slackware system and diffed the bki files to find some
as 'ame' and others as 'name' - so I used the lines above and managed to get
it to work just fine. Quite odd really... I am using the latest stable
versions of all of the GNU tools straight from their site.

Problem appears to be solved though, but maybe a check in the Makefile is in
order. It seems (through my google search, as well as a search of this
archive) that I am not the only one with this problem.

Cheers;
--
Mike

From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Mike Miller" <temp6453@hotmail.com>
CC: pgsql-general@postgresql.org
Subject: Re: INIT DB FAILURE
Date: Tue, 16 Jan 2001 13:18:04 -0500

"Mike Miller" <temp6453@hotmail.com> writes:

Fixing permissions on pre-existing data directory /usr/pgsql/data
Creating database system directory /usr/pgsql/data/base
Creating database XLOG directory /usr/pgsql/data/pg_xlog
Creating template database in /usr/pgsql/data/base/template1
ERROR: Error: unknown type 'ame'.

ERROR: Error: unknown type 'ame'.

Creating global relations in /usr/pgsql/data/base

Now that I look, there is a similar report in the pgsql-bugs archives
from last August, but no information about any resolution.

Please try the initdb with --debug added, and send me the resulting
output (it'll probably be kinda bulky, so don't send to the list).

regards, tom lane

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Mike Miller (#1)
Re: Re: INIT DB FAILURE

"Mike Miller" <temp6453@hotmail.com> writes:

mv global.bki global.bki.old; mv template1.bki template1.bki.old
cat global.bki.old | sed s/" ame"/" name"/ > global.bki
cat template1.bki.old | sed s/" ame"/" name"/ > global.bki

Solution is pretty simple actually (did figure this one out). I did find
other people complaining about this, but no solutions. But I just did the
install on an older slackware system and diffed the bki files to find some
as 'ame' and others as 'name' - so I used the lines above and managed to get
it to work just fine.

OK, so the breakage is not in the bootstrap parser but in the generation
of the .bki files. This is done by the shell script
src/backend/catalog/genbki.sh, and in looking it over, I notice with
suspicion the step

sed -e "s/;[ ]*$//g" \
-e "s/^[ ]*//" \
-e "s/[ ]Oid/\ oid/g" \
-e "s/[ ]NameData/\ name/g" \
-e "s/^Oid/oid/g" \
-e "s/^NameData/\name/g" \
-e "s/(NameData/(name/g" \
-e "s/(Oid/(oid/g" \
-e "s/NAMEDATALEN/$NAMEDATALEN/g" \
-e "s/INDEX_MAX_KEYS\*2/$INDEXMAXKEYS2/g" \
-e "s/INDEX_MAX_KEYS\*4/$INDEXMAXKEYS4/g" \
-e "s/INDEX_MAX_KEYS/$INDEXMAXKEYS/g" \
-e "s/FUNC_MAX_ARGS\*2/$INDEXMAXKEYS2/g" \
-e "s/FUNC_MAX_ARGS\*4/$INDEXMAXKEYS4/g" \
-e "s/FUNC_MAX_ARGS/$INDEXMAXKEYS/g" \
| $AWK '

In particular that "\name" looks pretty bogus. Would you try removing
that backslash and see if the script works then? I'll betcha that some
versions of sed convert the \n to a newline ...

BTW, what version of sed do you have, exactly?

regards, tom lane

#3Mike Miller
temp6453@hotmail.com
In reply to: Tom Lane (#2)
Re: Re: INIT DB FAILURE

GNU sed version 3.02.80

From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Mike Miller" <temp6453@hotmail.com>
CC: pgsql-general@postgresql.org, pgsql-hackers@postgresql.org
Subject: Re: Re: INIT DB FAILURE
Date: Tue, 16 Jan 2001 16:21:31 -0500

"Mike Miller" <temp6453@hotmail.com> writes:

mv global.bki global.bki.old; mv template1.bki template1.bki.old
cat global.bki.old | sed s/" ame"/" name"/ > global.bki
cat template1.bki.old | sed s/" ame"/" name"/ > global.bki

Solution is pretty simple actually (did figure this one out). I did

find

other people complaining about this, but no solutions. But I just did

the

install on an older slackware system and diffed the bki files to find

some

as 'ame' and others as 'name' - so I used the lines above and managed to

get

it to work just fine.

OK, so the breakage is not in the bootstrap parser but in the generation
of the .bki files. This is done by the shell script
src/backend/catalog/genbki.sh, and in looking it over, I notice with
suspicion the step

sed -e "s/;[ ]*$//g" \
-e "s/^[ ]*//" \
-e "s/[ ]Oid/\ oid/g" \
-e "s/[ ]NameData/\ name/g" \
-e "s/^Oid/oid/g" \
-e "s/^NameData/\name/g" \
-e "s/(NameData/(name/g" \
-e "s/(Oid/(oid/g" \
-e "s/NAMEDATALEN/$NAMEDATALEN/g" \
-e "s/INDEX_MAX_KEYS\*2/$INDEXMAXKEYS2/g" \
-e "s/INDEX_MAX_KEYS\*4/$INDEXMAXKEYS4/g" \
-e "s/INDEX_MAX_KEYS/$INDEXMAXKEYS/g" \
-e "s/FUNC_MAX_ARGS\*2/$INDEXMAXKEYS2/g" \
-e "s/FUNC_MAX_ARGS\*4/$INDEXMAXKEYS4/g" \
-e "s/FUNC_MAX_ARGS/$INDEXMAXKEYS/g" \
| $AWK '

In particular that "\name" looks pretty bogus. Would you try removing
that backslash and see if the script works then? I'll betcha that some
versions of sed convert the \n to a newline ...

BTW, what version of sed do you have, exactly?

regards, tom lane

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.