pg_dump without psql rights

Started by Robert Jamesabout 19 years ago4 messagesgeneral
Jump to latest
#1Robert James
srobertjames@gmail.com

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?

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Robert James (#1)
Re: pg_dump without psql rights

"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

#3Oleg Bartunov
oleg@sai.msu.su
In reply to: Tom Lane (#2)
Re: pg_dump without psql rights

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

#4Vinay Sajip
vinay_sajip@yahoo.co.uk
In reply to: Oleg Bartunov (#3)
Re: pg_dump without psql rights

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