Re: Calculage avg. width when operator = is missing - Mailing list pgsql-hackers

From Shulgin, Oleksandr
Subject Re: Calculage avg. width when operator = is missing
Date
Msg-id CACACo5SVJiD57V9bjjotP7bnQh4QJ4pGaACVMZM3JqXPLyYr2g@mail.gmail.com
Whole thread Raw
In response to Re: Calculage avg. width when operator = is missing  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Sep 24, 2015 at 12:30 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Tom Lane wrote:
>> Personally I think Alvaro's position is unduly conservative: to the extent
>> that plans change it'd likely be for the better.  But I'm not excited
>> enough to fight hard about it.

> I don't really care enough.  We have received some complaints about
> keeping plans stable, but maybe it's okay.

The other side of the coin is that there haven't been so many requests for
changing this; more than just this one, but not a groundswell.  So 9.5
only seems like a good compromise unless we get more votes for back-patch.

I reviewed the patch and concluded that it would be better to split
compute_minimal_stats into two functions instead of sprinkling it so
liberally with if's.  So I did that and pushed it.

Thanks, I was not really happy about all the checks because some of them were rather implicit (e.g. num_mcv being 0 due to track being NULL, etc.).  Adding this as a separate function makes me feel safer.

--
Alex

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Support for N synchronous standby servers - take 2
Next
From: Tomas Vondra
Date:
Subject: Re: DBT-3 with SF=20 got failed