pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: VACUUM and ANALYZE disagreeing on what reltuples means
Date: Mon, 24 Jul 2017 18:55:45 -0400
Message-ID: <19990.1500936945@sss.pgh.pa.us> (raw)
In-Reply-To: <16db4468-edfa-830a-f921-39a50498e77e@2ndquadrant.com>
References: <16db4468-edfa-830a-f921-39a50498e77e@2ndquadrant.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Tomas Vondra <tomas.vondra@2ndquadrant.com> 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



view thread (26+ messages)  latest in thread

Message-ID: <19990.1500936945@sss.pgh.pa.us>
Permalink:  ../19990.1500936945@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19990.1500936945@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, tomas.vondra@2ndquadrant.com
  Subject: Re: VACUUM and ANALYZE disagreeing on what reltuples means
  In-Reply-To: <19990.1500936945@sss.pgh.pa.us>

* 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