Re: Relation 'pg_user' does not exist

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

Matt Beauregard <matt(at)designscape(dot)com(dot)au> writes:
>> 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?

Well, there's more than one "thing" involved here --- a table or view
has dozens of entries in different system catalogs, as well as the
physical file. Touching the physical file should eliminate that `mdopen'
complaint you exhibited before, but I have a bad feeling that extensive
damage has been done to your system catalogs as well.

> Is there any way to get pg_dump to dump the data but nothing else?

pg_dump uses the system catalogs to *find* the data, so there's not
much hope it will work with damaged system catalogs. You might consider
trying manual COPY commands to dump out the data from your user tables.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ian Willis 2000-11-09 05:36:23 How to format strings
Previous Message Matt Beauregard 2000-11-09 04:57:27 Re: Relation 'pg_user' does not exist