Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f3MmA-00064t-Dl for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Apr 2018 14:19:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f3Mm7-0006FR-OD for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Apr 2018 14:19:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f3Mm7-0006FH-IG for pgsql-bugs@lists.postgresql.org; Tue, 03 Apr 2018 14:19:03 +0000 Received: from forward5o.cmail.yandex.net ([37.9.109.249]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f3Mlz-0000I9-EP for pgsql-bugs@postgresql.org; Tue, 03 Apr 2018 14:19:02 +0000 Received: from mxback4g.mail.yandex.net (mxback4g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:165]) by forward5o.cmail.yandex.net (Yandex) with ESMTP id 72B2C21571; Tue, 3 Apr 2018 17:18:52 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback4g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id w8ko57v3Yd-IoDurScI; Tue, 03 Apr 2018 17:18:51 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zsrv.org; s=mail; t=1522765131; bh=tbgA5pVKZh4AVjFSbZrwlMa+/1ToY++PuWDL6P762N0=; h=From:To:In-Reply-To:References:Subject:Message-Id:Date; b=OvxbhzRdE2FM4use89kF9v65EXjDzTtPF5VRo6BEjfn9ILUB6tCiwT/vZm3n6U1Tt RWcVccBUmIuMArjvP/z3bkpcKwL6gHiHeYPEyS/BCldPfaPUdCgtP4JZWBiyRsS37y xawQnrv4v3zSgS4Xslo1nYpgBWgUhNwHJb/FHgNQ= Authentication-Results: mxback4g.mail.yandex.net; dkim=pass header.i=@zsrv.org Received: by web44j.yandex.ru with HTTP; Tue, 03 Apr 2018 17:18:50 +0300 From: Sergei Kornilov To: =?utf-8?B?55+z5YuH6JmO?= , "pgsql-bugs@postgresql.org" In-Reply-To: References: Subject: Re: autovacuum can not remove dead tuples MIME-Version: 1.0 Message-Id: <1147541522765130@web44j.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 03 Apr 2018 17:18:50 +0300 Content-Transfer-Encoding: 7bit Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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.