Re: Strange behavior: row won't delete

From: Phoenix Kiula <phoenix(dot)kiula(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alan Hodgson <ahodgson(at)simkin(dot)ca>, pgsql-general(at)postgresql(dot)org
Subject: Re: Strange behavior: row won't delete
Date: 2009-03-03 17:25:32
Message-ID: e373d31e0903030925p732f94aawca7220de56f36c9c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Mar 4, 2009 at 1:23 AM, Phoenix Kiula <phoenix(dot)kiula(at)gmail(dot)com> wrote:
> On Wed, Mar 4, 2009 at 1:17 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Phoenix Kiula <phoenix(dot)kiula(at)gmail(dot)com> writes:
>>> How can I get rid of these open locks?
>>
>> Close the transactions that are holding them.  Look into
>> pg_stat_activity and pg_prepared_xacts.
>
>
> Thanks for this. But can I simply delete all the pg_locks table? Or
> delete all rows in pg_stat_activity? In my case the _xacts table is
> empty. Ideally I don't want to lose pg_stat_activity. I just want to
> change a RULE on a table. Is there any place I can do that?
>

I found 232 rows in pg_stat_activity of offending "current_query". How
can I delete them?

----
=# delete from pg_stat_activity where current_query like 'UPDATE visitcount%';
ERROR: cannot delete from a view
HINT: You need an unconditional ON DELETE DO INSTEAD rule
----

Thanks!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2009-03-03 17:29:17 Re: grant everything on everything and then revoke
Previous Message Phoenix Kiula 2009-03-03 17:23:26 Re: Strange behavior: row won't delete