pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sergei Kornilov <sk@zsrv.org>
To: 石勇虎 <shiyonghu651@pingan.com.cn>
To: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: autovacuum can not remove dead tuples
Date: Tue, 03 Apr 2018 17:18:50 +0300
Message-ID: <1147541522765130@web44j.yandex.ru> (raw)
In-Reply-To: <aa51d463ae8f410a8d5c4eb120e9bdc1@pingan.com.cn>
References: <aa51d463ae8f410a8d5c4eb120e9bdc1@pingan.com.cn>

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 an open transaction later.

regards Sergei.




view thread (4+ messages)  latest in thread

Message-ID: <1147541522765130@web44j.yandex.ru>
Permalink:  ../1147541522765130@web44j.yandex.ru/
Also on:    postgresql.org/message-id/1147541522765130@web44j.yandex.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: sk@zsrv.org, shiyonghu651@pingan.com.cn
  Subject: Re: autovacuum can not remove dead tuples
  In-Reply-To: <1147541522765130@web44j.yandex.ru>
  References: <aa51d463ae8f410a8d5c4eb120e9bdc1@pingan.com.cn> <1147541522765130@web44j.yandex.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox