Re: Permission denied: LOCK TABLE test.__proc IN ACCESS SHARE MODE

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: kynn(at)panix(dot)com
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Permission denied: LOCK TABLE test.__proc IN ACCESS SHARE MODE
Date: 2006-05-06 01:57:42
Message-ID: 20060506015742.GG12810@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

kynn(at)panix(dot)com wrote:

> pg_dump: SQL command failed
> pg_dump: Error message from server: ERROR: permission denied for schema test
> pg_dump: The command was: LOCK TABLE test.__proc IN ACCESS SHARE MODE
>
> I can't find out what transaction is responsible for this lock. When
> I look at the pg_locks table, I see only two locks, and they both seem
> to be due to the fact that I am interacting with psql at the moment,
> and this interaction is in no way directed to the database I'm trying
> to dump.

You are assuming that the problem is that there is a lock conflict.
This is not the case; you'd not get an error message (unless the command
had specified NOWAIT).

The problem here seems to be that you are trying to dump a schema or
table that the dumping user has no access to. You may either grant
those permissions, or create the dump with another user.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2006-05-06 02:08:58 Re: Permission denied: LOCK TABLE test.__proc IN ACCESS SHARE MODE
Previous Message kynn 2006-05-06 01:44:08 Permission denied: LOCK TABLE test.__proc IN ACCESS SHARE MODE