From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com> |
Cc: | David Fetter <david(at)fetter(dot)org>, Jeff Davis <pgsql(at)j-davis(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: range_agg |
Date: | 2020-03-12 12:38:16 |
Message-ID: | 20200312123816.GA7777@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello Paul, thanks for the thorough response to all these points.
Regarding the merge of multiranges with ranges, I had also thought of
that at some point and was leaning towards doing that, but after the
latest responses I think the arguments against it are sensible; and now
there's a clear majority for keeping them separate.
I'll be posting an updated version of the patch later today.
I was a bit scared bit this part:
On 2020-Mar-11, Paul A Jungwirth wrote:
> Finally, I think I mentioned this a long time ago, but I'm still not
> sure if this patch needs work around these things:
>
> - gist opclass
> - spgist opclass
> - typanalyze
> - selectivity
>
> I'd love for a real Postgres expert to tell me "No, we can add that
> later" or "Yes, you have to add that now."
While I think that the gist and spgist opclass are in the "very nice to
have but still optional" category, the other two items seem mandatory
(but I'm not 100% certain about that, TBH). I'm not sure we have time
to get those ready during this commitfest.
... thinking about gist+spgist, I think they could be written
identically to those for ranges, using the lowest (first) lower bound
and the higher (last) upper bound.
... thinking about selectivity, I think the way to write that is to
first compute the selectivity for the range across the first lower bound
and the last upper bound, and then subtract that for the "negative"
space between the contained ranges.
I have no immediate thoughts about typanalyze. I suppose it should be
somehow based on the implementation for ranges ... maybe a first-cut is
to construct fake ranges covering the whole multirange (as above) and
just use the ranges implementation (compute_range_stats).
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2020-03-12 12:43:17 | Re: Berserk Autovacuum (let's save next Mandrill) |
Previous Message | Prabhat Sahu | 2020-03-12 12:22:20 | Re: [Proposal] Global temporary tables |