Error:PG_DUMP relation pg_user does not exist - Mailing list pgsql-admin

From Fred Pope
Subject Error:PG_DUMP relation pg_user does not exist
Date
Msg-id 43629636.4050906@satcomresources.com
Whole thread Raw
Responses Re: Error:PG_DUMP relation pg_user does not exist
List pgsql-admin
I am running Postgresql 7.4.7. on RedHat ES-64 version 4 on a
Dual-Opteron Dual Core system.

I am having problems with the pg_dump command due to improper
initialization of the Database cluster on RH ES 4.

The initial symptom was visible on execution of the command:

pg_dump mydatabase > /tmp/mydatabase.dump

<error-message>
pg_dump: SQL command failed
pg_dump: Error message from server: ERROR:  relation "pg_user" does not
exist
pg_dump: The command was: SELECT (SELECT usename FROM pg_user WHERE
usesysid = datdba) as dba, pg_encoding_to_char(encoding) as encoding,
datpath FROM pg_database WHERE datname = 'mydatabase'
</error-message>

Hence I went into the mydatabase catalog and created that above
mentioned view, and now when I execute that query from within the
respective catalogs I get:

<response>
mydatabase=# select (select usename from pg_user where usesysid =
datdba) as dba, pg_encoding_to_char(encoding), datpath as encoding from
pg_database where datname = 'mydatabase';
    dba    | pg_encoding_to_char | encoding
----------+---------------------+----------
  postgres | SQL_ASCII           |
(1 row)
</response>

When the database engine is calling this query from the pg_dump command,
I am assuming this is calling from the database that you are trying to
dump. However, the following result makes me question this.

psql -l which returns:
<response>
bash-3.00$ psql -l
ERROR:  relation "pg_catalog.pg_user" does not exist
</response>

Hence this led me to try:

create view pg_catalog.pg_user as select pg_shadow.usename,
pg_shadow.usesysid, pg_shadow.usecreatedb, pg_shadow.usesuper,
pg_shadow.usecatupd, '********'::text as passwd, pg_shadow.valuntil,
pg_shadow.useconfig from pg_shadow;

<response>
ERROR:  permission denied to create "pg_catalog.pg_user"
DETAIL:  System catalog modifications are currently disallowed.
</response>

So my question now is how do I enable system catalog modifications.

Thanks in advance.

fred at satcomresources dot com

Attachment

pgsql-admin by date:

Previous
From: Geoffrey
Date:
Subject: Re: subscribe
Next
From: navicat
Date:
Subject: use Navicat PostgreSQL GUI to import Access data