Re: Making all nbtree entries unique by having heap TIDs participate in comparisons
Alexander Korotkov <a.korotkov@postgrespro.ru>
From: Alexander Korotkov <a.korotkov@postgrespro.ru>
To: Peter Geoghegan <pg@bowt.ie>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Thomas Munro <thomas.munro@enterprisedb.com>,
Claudio Freire <klaussfreire@gmail.com>, Anastasia Lubennikova <a.lubennikova@postgrespro.ru>, "Andrey V. Lepikhov" <a.lepikhov@postgrespro.ru>
Date: 2019-01-04T15:40:16Z
Lists: pgsql-hackers
Hi! I'm starting to look at this patchset. Not ready to post detail review, but have a couple of questions. On Wed, Sep 19, 2018 at 9:24 PM Peter Geoghegan <pg@bowt.ie> wrote: > I still haven't managed to add pg_upgrade support, but that's my next > step. I am more or less happy with the substance of the patch in v5, > and feel that I can now work backwards towards figuring out the best > way to deal with on-disk compatibility. It shouldn't be too hard -- > most of the effort will involve coming up with a good test suite. Yes, it shouldn't be too hard, but it seems like we have to keep two branches of code for different handling of duplicates. Is that true? + * In the worst case (when a heap TID is appended) the size of the returned + * tuple is the size of the first right tuple plus an additional MAXALIGN() + * quantum. This guarantee is important, since callers need to stay under + * the 1/3 of a page restriction on tuple size. If this routine is ever + * taught to truncate within an attribute/datum, it will need to avoid + * returning an enlarged tuple to caller when truncation + TOAST compression + * ends up enlarging the final datum. I didn't get the point of this paragraph. Does it might happen that first right tuple is under tuple size restriction, but new pivot tuple is beyond that restriction? If so, would we have an error because of too long pivot tuple? If not, I think this needs to be explained better. ------ Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company
Commits
-
Add "split after new tuple" nbtree optimization.
- f21668f328c8 12.0 landed
-
Add nbtree high key "continuescan" optimization.
- 29b64d1de7c7 12.0 landed
-
Allow amcheck to re-find tuples using new search.
- c1afd175b5b2 12.0 landed
-
Consider secondary factors during nbtree splits.
- fab250243387 12.0 landed
-
Make heap TID a tiebreaker nbtree index column.
- dd299df8189b 12.0 landed
-
Refactor nbtree insertion scankeys.
- e5adcb789d80 12.0 landed
-
Redesign the partition dependency mechanism.
- 1d92a0c9f7dd 12.0 cited
-
Avoid unnecessary palloc overhead in _bt_first(). The temporary
- d961a5689966 8.1.0 cited