By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,834 Members | 2,234 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,834 IT Pros & Developers. It's quick & easy.

Bug in pg_dumpall

P: n/a
I created a user with no superuser privileges:

CREATE USER aaa PASSWORD 'bbb' NOCREATEDB NOCREATEUSER;

Then i created an authorization schema:

CREATE SCHEMA AUTHORIZATION aaa;

All worked fine.

The problem is in the pg_dumpall file.

Looking into the generated sql, i find that the schema is created with
the command:

CREATE USER aaa PASSWORD 'bbb' NOCREATEDB NOCREATEUSER;

SET SESSION AUTHORIZATION aaa;
CREATE SCHEMA aaa;

This fails giving me the following error:
ERROR: aaaa: permission denied

Any ideas?

I'm using Postgresql 7.3.4.

--
Ing. Denis Gasparin: de***@edistar.com
---------------------------
Programmer & System Administrator - Edistar srl
Via dell'artigianato, 1
31050 Vedelago TV
Telefono: 0423-733209
Fax: 0423-733733
Internet: www.edistar.com
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Denis Gasparin <de***@edistar.com> writes:
Looking into the generated sql, i find that the schema is created with
the command:

CREATE USER aaa PASSWORD 'bbb' NOCREATEDB NOCREATEUSER;

SET SESSION AUTHORIZATION aaa;
CREATE SCHEMA aaa;

This fails giving me the following error:
ERROR: aaaa: permission denied

Any ideas?


Are you doing the restore as a regular user? Output of pg_dumpall is
designed to be restored by the superuser.

-Doug

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 12 '05 #2

P: n/a
I'm restoring it as the superuser.

You can try to execute the commands directly from psql.

Denis

Doug McNaught wrote:
Denis Gasparin <de***@edistar.com> writes:

Looking into the generated sql, i find that the schema is created with
the command:

CREATE USER aaa PASSWORD 'bbb' NOCREATEDB NOCREATEUSER;

SET SESSION AUTHORIZATION aaa;
CREATE SCHEMA aaa;

This fails giving me the following error:
ERROR: aaaa: permission denied

Any ideas?

Are you doing the restore as a regular user? Output of pg_dumpall is
designed to be restored by the superuser.

-Doug

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)



---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 12 '05 #3

P: n/a
Denis Gasparin <de***@edistar.com> writes:
CREATE USER aaa PASSWORD 'bbb' NOCREATEDB NOCREATEUSER;
CREATE SCHEMA AUTHORIZATION aaa;
All worked fine.
The problem is in the pg_dumpall file. SET SESSION AUTHORIZATION aaa;
CREATE SCHEMA aaa;


This is fixed in 7.4 --- I get

CREATE SCHEMA aaa AUTHORIZATION aaa;
regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.