Re: [HACKERS] Still having trouble importing 6.3 DB - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Still having trouble importing 6.3 DB
Date
Msg-id 24835.915506312@sss.pgh.pa.us
Whole thread Raw
In response to Still having trouble importing 6.3 DB  ("Stan Brown" <stanb@awod.com>)
Responses Re: [HACKERS] Still having trouble importing 6.3 DB  (Bruce Momjian <maillist@candle.pha.pa.us>)
Re: [HACKERS] Still having trouble importing 6.3 DB  (Angelos Karageorgiou <angelos@incredible.com>)
List 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


pgsql-hackers by date:

Previous
From: "Stan Brown"
Date:
Subject: Still having trouble importing 6.3 DB
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Still having trouble importing 6.3 DB