Re: Relation 'pg_user' does not exist - Mailing list pgsql-general

From Matt Beauregard
Subject Re: Relation 'pg_user' does not exist
Date
Msg-id 20001109155726.V324@designscape.com.au
Whole thread Raw
In response to Re: Relation 'pg_user' does not exist  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Relation 'pg_user' does not exist  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Wed, Nov 08, 2000 at 10:03:05PM -0500, Tom Lane wrote:
> Matt Beauregard <matt@designscape.com.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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Problems dumping a DB
Next
From: Tom Lane
Date:
Subject: Re: Relation 'pg_user' does not exist