Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dZmHy-0005u0-M3 for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Jul 2017 22:57:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dZmHy-00073e-7I for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Jul 2017 22:57:22 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dZmGT-0004KW-9U for pgsql-hackers@postgresql.org; Mon, 24 Jul 2017 22:55:49 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dZmGQ-0004lr-ME for pgsql-hackers@postgresql.org; Mon, 24 Jul 2017 22:55:48 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v6OMtjGQ019991; Mon, 24 Jul 2017 18:55:45 -0400 From: Tom Lane To: Tomas Vondra cc: pgsql-hackers@postgresql.org Subject: Re: VACUUM and ANALYZE disagreeing on what reltuples means In-reply-to: <16db4468-edfa-830a-f921-39a50498e77e@2ndquadrant.com> References: <16db4468-edfa-830a-f921-39a50498e77e@2ndquadrant.com> Comments: In-reply-to Tomas Vondra message dated "Tue, 25 Jul 2017 00:47:36 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19989.1500936945.1@sss.pgh.pa.us> Date: Mon, 24 Jul 2017 18:55:45 -0400 Message-ID: <19990.1500936945@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Tomas Vondra writes: > It seems to me that VACUUM and ANALYZE somewhat disagree on what exactly > reltuples means. VACUUM seems to be thinking that > reltuples = live + dead > while ANALYZE apparently believes that > reltuples = live > The question is - which of the reltuples definitions is the right one? > I've always assumed that "reltuples = live + dead" but perhaps not? I think the planner basically assumes that reltuples is the live tuple count, so maybe we'd better change VACUUM to get in step. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers