Thread: pg_dump without psql rights

pg_dump without psql rights

From
"Robert James"
Date:
I'd like to run pg_dump on a database that I have full read/write/create/drop access to, but am not running as psql.

I'm getting this error:
pg_dump: SQL command failed
pg_dump: Error message from server: ERROR: permission denied for relation pg_ts_dict
pg_dump: The command was: LOCK TABLE public.pg_ts_dict IN ACCESS SHARE MODE

(tried on both Windows and Linux)

Is there anyway I can do a pg_dump as non psql?  Perhaps without locks?

Re: pg_dump without psql rights

From
Tom Lane
Date:
"Robert James" <srobertjames@gmail.com> writes:
> I'm getting this error:
> pg_dump: SQL command failed
> pg_dump: Error message from server: ERROR: permission denied for relation
> pg_ts_dict
> pg_dump: The command was: LOCK TABLE public.pg_ts_dict IN ACCESS SHARE MODE

> Is there anyway I can do a pg_dump as non psql?  Perhaps without locks?

No.  However, I am wondering why it is that tsearch2 doesn't make its
config tables publicly readable ...

            regards, tom lane

Re: pg_dump without psql rights

From
Oleg Bartunov
Date:
On Mon, 26 Mar 2007, Tom Lane wrote:

> "Robert James" <srobertjames@gmail.com> writes:
>> I'm getting this error:
>> pg_dump: SQL command failed
>> pg_dump: Error message from server: ERROR: permission denied for relation
>> pg_ts_dict
>> pg_dump: The command was: LOCK TABLE public.pg_ts_dict IN ACCESS SHARE MODE
>
>> Is there anyway I can do a pg_dump as non psql?  Perhaps without locks?
>
> No.  However, I am wondering why it is that tsearch2 doesn't make its
> config tables publicly readable ...

config tables are like other user created tables, the same access policy.
It's up to user grant access to them.


     Regards,
         Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

Re: pg_dump without psql rights

From
Vinay Sajip
Date:
>
> config tables are like other user created tables, the same access policy.
> It's up to user grant access to them.

True, but the tables should be created with the same owner as the
database. I'm finding that they're created with owner "postgres" even
though the database they're created in has a different owner.

Regards,

Vinay Sajip