Re: autovacuum can not remove dead tuples - Mailing list pgsql-bugs

From Sergei Kornilov
Subject Re: autovacuum can not remove dead tuples
Date
Msg-id 1147541522765130@web44j.yandex.ru
Whole thread Raw
In response to autovacuum can not remove dead tuples  (石勇虎 <SHIYONGHU651@pingan.com.cn>)
Responses 答复: autovacuum can not remove dead tuples  (石勇虎 <SHIYONGHU651@pingan.com.cn>)
List pgsql-bugs
Hello
And an additional question:

> [postgres:5543@ela] [04-03.17:27:09]=# select pid,state,substr(query,0,100) from pg_stat_activity where query ~
'ela_elifeassist_product';
 
Have you another long transactions related not to this table?
Any long transaction will prevent vacuum. Vacuum can only delete rows older than the oldest transaction regardless
relations.For example, transaction
 
begin;
select * from tablename1;
-- sleep 10 min
select * from another_tablename;
commit;
We must leave some dead rows in another_tablename for this 10 minutes because we do not know which rows are required in
anopen transaction later.
 

regards Sergei.


pgsql-bugs by date:

Previous
From: Sergei Kornilov
Date:
Subject: Re: autovacuum can not remove dead tuples
Next
From: Bruce Momjian
Date:
Subject: Re: BUG #15122: can't import data if table has a constraint with afunction calling another function