From: | Peter Griggs <petergriggs33(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | GiST secondary split |
Date: | 2020-03-20 21:36:02 |
Message-ID: | CACEwj4pQ3fycFe2sUC_wK8YC4RjKbRieZyFt1Zxmbr0czytU4g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I am hacking some GIST code for a research project and wanted clarification
about what exactly a secondary split is in GIST. 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.
/*
* Clean up when we did a secondary split but the user-defined PickSplit
* method didn't support it (leaving spl_ldatum_exists or spl_rdatum_exists
* true).
*
* We consider whether to swap the left and right outputs of the secondary
* split; this can be worthwhile if the penalty for merging those tuples into
* the previously chosen sets is less that way.
*
* In any case we must update the union datums for the current column by
* adding in the previous union keys (oldL/oldR), since the user-defined
* PickSplit method didn't do so.
*/
static void
supportSecondarySplit(Relation r, GISTSTATE *giststate, int attno,
GIST_SPLITVEC *sv, Datum oldL, Datum oldR)
{
Best,
Peter
--
Peter Griggs
Masters of Engineering (Meng) in Computer Science
Massachusetts Institute of Technology | 2020
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2020-03-20 22:14:13 | Re: Should we add xid_current() or a int8->xid cast? |
Previous Message | Alvaro Herrera | 2020-03-20 20:35:25 | Re: Add FOREIGN to ALTER TABLE in pg_dump |