From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Cc: Andreas Joseph Krogh <andreas@visena.com>
Subject: Re: Bogus ANALYZE results for an otherwise-unique column with many nulls
Date: Sun, 07 Aug 2016 12:35:56 -0400
Message-ID: <24135.1470587756@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEZATCVQ9AGw1thJiViYWHXXZ46_p6FfDPBeyTC9BSNDz+6L6g@mail.gmail.com>
References: <16143.1470350371@sss.pgh.pa.us>
<871t23fwgb.fsf@news-spur.riddles.org.uk>
<87wpjvecwz.fsf@news-spur.riddles.org.uk>
<4174.1470407261@sss.pgh.pa.us>
<87oa57dsnn.fsf@news-spur.riddles.org.uk>
<25440.1470430114@sss.pgh.pa.us>
<CAEZATCVQ9AGw1thJiViYWHXXZ46_p6FfDPBeyTC9BSNDz+6L6g@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> On 5 August 2016 at 21:48, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> OK, thanks. What shall we do about Andreas' request to back-patch this?
>> I'm personally willing to do it, but there is the old bugaboo of "maybe
>> it will destabilize a plan that someone is happy with".
> My inclination would be to back-patch it because arguably it's a
> bug-fix -- at the very least the old behaviour didn't match the docs
> for stadistinct:
Yeah. I suspect that situations like this are pretty rare, or we'd have
recognized the problem sooner. And at least for Andreas, it'd be fixing
a real problem. I'll apply the back-patch unless I hear objections in
the next couple of hours.
> Additionally, I think that example is misleading because it's only
> really true if there are no null values in the column. Perhaps it
> would help to have a more explicit example to illustrate how nulls
> affect stadistinct, for example:
Good idea, will do.
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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, dean.a.rasheed@gmail.com, andrew@tao11.riddles.org.uk, andreas@visena.com
Subject: Re: Bogus ANALYZE results for an otherwise-unique column with many nulls
In-Reply-To: <24135.1470587756@sss.pgh.pa.us>
References: <16143.1470350371@sss.pgh.pa.us> <871t23fwgb.fsf@news-spur.riddles.org.uk> <87wpjvecwz.fsf@news-spur.riddles.org.uk> <4174.1470407261@sss.pgh.pa.us> <87oa57dsnn.fsf@news-spur.riddles.org.uk> <25440.1470430114@sss.pgh.pa.us> <CAEZATCVQ9AGw1thJiViYWHXXZ46_p6FfDPBeyTC9BSNDz+6L6g@mail.gmail.com> <24135.1470587756@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