Re: VACUUM and ANALYZE disagreeing on what reltuples means

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: VACUUM and ANALYZE disagreeing on what reltuples means
Date: 2017-07-24 22:55:45
Message-ID: 19990.1500936945@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2017-07-24 23:33:08 Re: More race conditions in logical replication
Previous Message Tomas Vondra 2017-07-24 22:47:36 VACUUM and ANALYZE disagreeing on what reltuples means