[postgis-users] Releasing a lock on a view/database
andy at squeakycode.net
Thu Mar 1 06:53:27 PST 2012
On 3/1/2012 4:05 AM, Chris Stromberg wrote:
> I'm trying to edit a view that is not currently in active use, but has been
> used previously.
> when submitting the change to the view, the SQL window just says 'query is
> running' and it'll sit there until i stop it.
> If i restart the postgres service, obviousely, all locks are released, so
> when i run the update view statement, it works immediately. But this is not
> practical when other tables/views are in use.
> Any one know how i can amend a view when the rest of the database is in use?
Sounds like you have transactions left open, which can keep things
locked. check ps ax|grep postgres for things that say "idle in transaction"
Also, you can query pg_locks and it can tell you what is using it.
Also, check pg_stat_activity so see what's currently running.
More information about the postgis-users