Good morning,
I tried to dump a pg 7.1 database last night, but got the following error:
dumpSequence(user_id_sequence): SELECT failed. Explanation from backend:
'ERROR: user_id_sequence: Permission denied.
user_id_sequence is just
'create sequence user_id_sequence'
Thinking it might be a 7.1 problem I upgraded to 7.1.2. Same problem.
I created a test case:
p0 rack[44]% psql -U postgres template1
~/wd/kksmith/www/doc/sql
Welcome to psql, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
template1=# create user test;
CREATE USER
template1=# create database test;
CREATE DATABASE
template1=# \q;
p0 rack[45]% psql -U test test
~/wd/kksmith/www/doc/sql
test=> create sequence user_id_sequence
CREATE
test=> \d
List of relations
Name | Type | Owner
------------------+----------+-------
user_id_sequence | sequence | test
(1 row)
test=> \q
p0 rack[46]% pg_dump -S postgres --no-owner test > ~/test.dump
dumpSequence(user_id_sequence): SELECT failed. Explanation from backend:
'ERROR: user_id_sequence: Permission denied.
'.
p0 rack[47]% psql -U test test
~/wd/kksmith/www/doc/sql
test=> grant all on user_id_sequence to test;
CHANGE
test=> \q
p0 rack[49]% pg_dump -S postgres --no-owner test >! ~/test.dump
dumpSequence(user_id_sequence): SELECT failed. Explanation from backend:
'ERROR: user_id_sequence: Permission denied.
I'm stumped. Suggestions? Post to pgsql-hackers? Or file a bug report?
--cro
cro@ncacasi.org