From: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Index only scan for cube and seg |
Date: | 2017-10-28 21:24:04 |
Message-ID: | CAPpHfdvaL3YFRzy7=BDLPRCpWP4=X4SuX7jHLQBdFrOkD2-WCA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Oct 27, 2017 at 9:54 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > On Thu, Oct 26, 2017 at 12:22 PM, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
> wrote:
> >> For cube there is new default opclass.
>
> > I seem to recall that changing the default opclass causes unsolvable
> > problems with upgrades. You might want to check the archives for
> > previous discussions of this issue; unfortunately, I don't recall the
> > details off-hand.
>
> Quite aside from that, replacing the opclass with a new one creates
> user-visible headaches that I don't think are justified, i.e. having to
> reconstruct indexes in order to get the benefit.
>
> Maybe I'm missing something, but ISTM you could just drop the compress
> function and call it good. This would mean that an IOS scan would
> sometimes hand back a toast-compressed value, but what's the problem
> with that?
>
+1,
I think in this case replacing default opclass or even duplicating opclass
isn't justified.
(The only reason for making a decompress function that just detoasts
> is that your other support functions then do not have to consider
> the possibility that they're handed a toast-compressed value. I have
> not checked whether that really matters for cube.)
>
As I can see, cube GiST code always uses DatumGetNDBOX() macro to transform
Datum to (NDBOX *).
#define DatumGetNDBOX(x) ((NDBOX *) PG_DETOAST_DATUM(x))
Thus, it should be safe to just remove both compress/decompress methods
from existing opclass.
------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2017-10-28 21:35:56 | Re: Re: proposal - psql: possibility to specify sort for describe commands, when size is printed |
Previous Message | Michael Paquier | 2017-10-28 21:07:59 | Re: ALTER COLUMN TYPE vs. domain constraints |