Re: [HACKERS] Still having trouble importing 6.3 DB

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: stanb@awod.com
Cc: pgsql-hackers@postgreSQL.org
Date: 1999-01-05T03:18:32Z
Lists: pgsql-hackers
"Stan Brown" <stanb@awod.com> writes:
> 	I am runing as the postgres superuser, and trying to inport the data
> 	from my 6.3 databse inot my nice new 6.4.2 one. I am geting errors
> 	almost as soon as the first non-postgres user is encuntered. 
> \connect - stan
> connecting as new user: stan
> FATAL 1:  SetUserId: user 'stan' is not in 'pg_shadow'
> 	What is this pg_shadow & how do I fix it?

Ah, I see what's going on.  You're getting burnt by not having upgraded
to 6.3.1 or 6.3.2 before moving to 6.4.  The pg_user table was changed
at 6.3.1, and pg_dumpall was modified accordingly --- but the 6.3
version of pg_dumpall produces a script that will not successfully load
the user definitions into 6.3.1 or later.

I think you can make it work by just changing "copy pg_user from stdin;"
to "copy pg_shadow from stdin;" a couple lines down from the top of
the dump script.

Memo to hackers: we need a better way of coping with cross-version
changes that affect dump scripts...

			regards, tom lane