pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Error:PG_DUMP relation pg_user does not exist
2+ messages / 2 participants
[nested] [flat]

* Error:PG_DUMP relation pg_user does not exist
@ 2005-10-28 21:20  Fred Pope <fred.pope@satcomresources.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Fred Pope @ 2005-10-28 21:20 UTC (permalink / raw)
  To: 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

Attachments:

fred.pope.vcf (text/x-vcard, 320B) download begin:vcard fn:Fred Pope n:Pope;Fred org:Satcom Resources LLC adr:101 Eagle Road Building 7;;PO Box 1639;Avon;CO;81620;USA email;internet:fred.pope@satcomresources.com title:CEO tel;work:970-748-3094 tel;fax:970-748-3096 tel;cell:970-471-1073 x-mozilla-html:FALSE url:http://www.satcomresources.com version:2.1 end:vcard
^ permalink raw reply [nested|flat] 2+ messages in thread

* Re: Error:PG_DUMP relation pg_user does not exist
@ 2005-11-03 18:09  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Fred Pope <fred.pope@satcomresources.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2005-11-03 18:09 UTC (permalink / raw)
  To: fred.pope@satcomresources.com; +Cc: pgsql-admin

Fred Pope <fred.pope@satcomresources.com> writes:
> 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.

Yeah, this is a known problem in some earlier releases of the RHEL4
postgres RPMs --- if you tried to run the initdb with SELinux
enforcement enabled, a lot of the init steps fail silently, and
you end up with no pg_user view, nor several other important things.

> <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.

Stand-alone backend with -O command-line option.

As soon as you are able to dump your data, I'd recommend redoing
initdb with SELinux off (or update to a newer RPM which works around
the problem, then initdb).

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-11-03 18:09 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-10-28 21:20 Error:PG_DUMP relation pg_user does not exist Fred Pope <fred.pope@satcomresources.com>
2005-11-03 18:09 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox