How to delete all locks? Re: Strange behavior: row won't delete

From: Phoenix Kiula <phoenix(dot)kiula(at)gmail(dot)com>
To: Adrian Klaver <aklaver(at)comcast(dot)net>, Alan Hodgson <ahodgson(at)simkin(dot)ca>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: How to delete all locks? Re: Strange behavior: row won't delete
Date: 2009-03-03 17:18:46
Message-ID: e373d31e0903030918p57865a8o6681c9e13bec84b1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Mar 4, 2009 at 12:55 AM, Phoenix Kiula <phoenix(dot)kiula(at)gmail(dot)com> wrote:
> I guess my question is, how should I remove all pending locks on a
> table so that I can get on with the rest of the stuff?
>
> I mean, even if I can now find an offending RULE on the table, I
> cannot replace or remove it. '

Any ideas? I think I have identified the offending RULE that was newly
created on the table. It may have missed the WHERE condition.

But even if CREATE OR REPLACE this rule, the command doesn't go
through. So I'm stuck in a vicious loop.

How can I get rid of all open locks? When I go through pg_locks there
are about 1041 of them right now. I am looking for a mechanism of
deleting them all (can I just delete all rows in pg_locks?) instead of
manually going through 1041 on a live database.

Thanks!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Phoenix Kiula 2009-03-03 17:23:26 Re: Strange behavior: row won't delete
Previous Message Tom Lane 2009-03-03 17:17:09 Re: Strange behavior: row won't delete