From: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
---|---|
To: | Peter Griggs <petergriggs33(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: GiST secondary split |
Date: | 2020-03-21 11:03:37 |
Message-ID: | CAPpHfds7=a_aC3S72NuArddZx_shHNBaTVxoBvDxWyt7eyX=Kg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi, Peter!
On Sat, Mar 21, 2020 at 12:36 AM Peter Griggs <petergriggs33(at)gmail(dot)com> wrote:
> I am hacking some GIST code for a research project and wanted clarification about what exactly a secondary split is in GIST.
Secondary split in GiST is the split by second and subsequent columns
on multicolumn GiST indexes. In the general it works as following.
Split by the first column produced two union keys. It might happen
that some of first column values are contained in both of union keys.
If so, corresponding tuples are subject of secondary split.
> More specifically I am wondering why the supportSecondarySplit function (which is in src/backend/access/gist/gistsplit.c) can assume that the data is currently on the left side in order to swap it.
I don't think it assumes that all the data is currently on the left
side. There is left and right sides of primary split. And in the
same time there is left and right sides of secondary split. The might
union them straight or crosswise. The name of leaveOnLeft variable
might be confusing. leaveOnLeft == true means straight union, while
leaveOnLeft == false means crosswise union.
------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | Kartyshov Ivan | 2020-03-21 11:16:11 | Re: [HACKERS] make async slave to wait for lsn to be replayed |
Previous Message | Anna Akenteva | 2020-03-21 10:51:13 | Re: [HACKERS] make async slave to wait for lsn to be replayed |