Search Postgresql Archives

Re: Strange behavior: row won't delete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 4, 2009 at 1:23 AM, Phoenix Kiula <phoenix.kiula@xxxxxxxxx> wrote:
> On Wed, Mar 4, 2009 at 1:17 AM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
>> Phoenix Kiula <phoenix.kiula@xxxxxxxxx> 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!

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux