Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means

2017-11-02 Thread Tom Lane
Haribabu Kommi writes: > The changes are fine and now it reports proper live tuples in both > pg_class and stats. The other issue of continuous vacuum operation > leading to decrease of number of live tuples is not related to this > patch and that can be handled

Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means

2017-09-24 Thread Haribabu Kommi
On Mon, Sep 25, 2017 at 4:39 AM, Tomas Vondra wrote: > > > On 09/06/2017 09:45 AM, Haribabu Kommi wrote: > > > > > > On Tue, Jul 25, 2017 at 9:33 PM, Tomas Vondra > > > > wrote: > > > > On

Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means

2017-09-24 Thread Tomas Vondra
Hi, Apologies, I forgot to respond to the second part of your message. On 09/06/2017 09:45 AM, Haribabu Kommi wrote: > > While testing this patch, I found another problem that is not related to > this patch. When the vacuum command is executed mutiple times on > a table with no dead rows, the

Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means

2017-09-24 Thread Tomas Vondra
On 09/06/2017 09:45 AM, Haribabu Kommi wrote: > > > On Tue, Jul 25, 2017 at 9:33 PM, Tomas Vondra > > wrote: > > On 7/25/17 12:55 AM, Tom Lane wrote: > > Tomas Vondra

Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means

2017-09-15 Thread Daniel Gustafsson
> On 06 Sep 2017, at 09:45, Haribabu Kommi wrote: > > On Tue, Jul 25, 2017 at 9:33 PM, Tomas Vondra > wrote: > On 7/25/17 12:55 AM, Tom Lane wrote: > Tomas Vondra

Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means

2017-09-06 Thread Haribabu Kommi
On Tue, Jul 25, 2017 at 9:33 PM, Tomas Vondra wrote: > On 7/25/17 12:55 AM, Tom Lane wrote: > >> Tomas Vondra writes: >> >>> It seems to me that VACUUM and ANALYZE somewhat disagree on what >>> exactly reltuples means. VACUUM seems to

Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means

2017-08-01 Thread Noah Misch
On Tue, Jul 25, 2017 at 07:02:28PM +0200, Tomas Vondra wrote: > On 7/25/17 5:04 PM, Tom Lane wrote: > >Tomas Vondra writes: > >>Attached is a patch that (I think) does just that. The disagreement > >>was caused by VACUUM treating recently dead tuples as live, while >

Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means

2017-07-25 Thread Tomas Vondra
On 7/25/17 5:04 PM, Tom Lane wrote: Tomas Vondra writes: On 7/25/17 12:55 AM, Tom Lane wrote: I think the planner basically assumes that reltuples is the live tuple count, so maybe we'd better change VACUUM to get in step. Attached is a patch that (I think)

Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means

2017-07-25 Thread Tom Lane
Tomas Vondra writes: > On 7/25/17 12:55 AM, Tom Lane wrote: >> I think the planner basically assumes that reltuples is the live >> tuple count, so maybe we'd better change VACUUM to get in step. > Attached is a patch that (I think) does just that. The disagreement

Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means

2017-07-25 Thread Tomas Vondra
On 7/25/17 12:55 AM, Tom Lane wrote: 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

Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means

2017-07-24 Thread Tom Lane
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 -