Matt Beauregard <matt@designscape.com.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