Re: Relation 'pg_user' does not exist

From: Matt Beauregard <matt(at)designscape(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Relation 'pg_user' does not exist
Date: 2000-11-09 04:57:27
Message-ID: 20001109155726.V324@designscape.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Nov 08, 2000 at 10:03:05PM -0500, Tom Lane wrote:
> Matt Beauregard <matt(at)designscape(dot)com(dot)au> writes:
> >>>> NOTICE: mdopen: couldn't open pg_user: No such file or directory
> >>
> >> This is strange in itself. There should be an (empty) file named
> >> pg_user in your $PGDATA/base/template1 directory --- is there?
> >> What about pg_views?
>
> > Neither are there.
>
> Hmm. *Something's* been tromping on your database, then. Hard to tell
> what happened from the information at hand ... but I'll bet the
> corrupted index on pg_class is related somehow.
>
> Since these are only views, the datafiles underlying them would be empty
> anyway --- so you can recreate the datafiles just by doing
> "touch $PGDATA/base/template1/pg_user" etc.

I've touched pg_user and pg_group but the db still won't find them.
Is it normal to not be able to create things beginning with pg_ inside
template1, or has template1 lost its magic?

> You could probably rebuild the corrupted index using REINDEX. I haven't
> had to do that myself so I'm not sure about the procedure.

I had a go at that but it doesn't seem to have fixed things.

> I'd definitely recommend a full dump, initdb, restore once you have
> things working well enough to allow a dump. Whatever happened here,
> you probably haven't seen all the effects yet :-(

Is there any way to get pg_dump to dump the data but nothing else?
The databases in their current state work fine for normal
select/insert/update, just not for dumping.

--
Matt Beauregard
Information Technology Operations, DesignScape

Ph: +61 2 9361 4233 Fx: +61 2 9361 4633

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2000-11-09 05:25:33 Re: Relation 'pg_user' does not exist
Previous Message Tom Lane 2000-11-09 04:09:27 Re: Problems dumping a DB