Re: autovacuum can not remove dead tuples

From: Sergei Kornilov <sk(at)zsrv(dot)org>
To: 石勇虎 <shiyonghu651(at)pingan(dot)com(dot)cn>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: autovacuum can not remove dead tuples
Date: 2018-04-03 14:18:50
Message-ID: 1147541522765130@web44j.yandex.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello
And an additional question:

> [postgres:5543(at)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 an open transaction later.

regards Sergei.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2018-04-03 17:23:52 Re: BUG #15122: can't import data if table has a constraint with a function calling another function
Previous Message Sergei Kornilov 2018-04-03 14:07:01 Re: autovacuum can not remove dead tuples