Re: [HACKERS] Still having trouble importing 6.3 DB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: stanb(at)awod(dot)com
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Still having trouble importing 6.3 DB
Date: 1999-01-05 03:18:32
Message-ID: 24835.915506312@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Stan Brown" <stanb(at)awod(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-01-05 03:30:40 Re: [HACKERS] Still having trouble importing 6.3 DB
Previous Message Stan Brown 1999-01-05 02:33:42 Still having trouble importing 6.3 DB