Re: WIP: Covering + unique indexes.
Peter Geoghegan <pg@bowt.ie>
On Tue, Apr 17, 2018 at 3:12 AM, Alexander Korotkov <a.korotkov@postgrespro.ru> wrote: > Hmm, what do you think about making BTreeTupGetNAtts() take tupledesc > argument, not relation> It anyway doesn't need number of key attributes, > only total number of attributes. Then _bt_isequal() would be able to use > BTreeTupGetNAtts(). That would make the BTreeTupGetNAtts() assertions quite a bit more verbose, since there is usually no existing tuple descriptor variable, but there is almost always a "rel" variable. The coverage within _bt_isequal() does not seem important, because we only use it with the page high key in rare cases, where _bt_moveright() will already have tested the highkey. > I think it's completely OK to fix broken things when you've to touch > them. Probably, Teodor would decide to make that by separate commit. > So, it's up to him. You're right to say that this old negative infinity tuple code within _bt_insertonpg() is broken code, and not just dead code. The code doesn't just confuse things (e.g. see recent commit 2a67d644). It also seems like it could actually be harmful. This is code that could only ever corrupt your database. I'm fine if Teodor wants to commit that change separately, of course. -- Peter Geoghegan
Commits
-
Adjust INCLUDE index truncation comments and code.
- 075aade4361b 11.0 landed
-
Add commentary explaining why MaxIndexTuplesPerPage calculation is safe.
- 2a67d6440db4 11.0 cited
-
Indexes with INCLUDE columns and their support in B-tree
- 8224de4f42cc 11.0 landed
-
Add amcheck verification of heap relations belonging to btree indexes.
- 7f563c09f890 11.0 cited
-
Doc: move info for btree opclass implementors into main documentation.
- 3785f7eee3d9 11.0 cited
-
Doc: mention that you can't PREPARE TRANSACTION after NOTIFY.
- e4fbf22831c2 11.0 cited
-
Remove dedicated B-tree root-split record types.
- 0c504a80cf2e 11.0 cited
-
Restructure index access method API to hide most of it at the C level.
- 65c5fcd353a8 9.6.0 cited
-
Split _bt_insertonpg to two functions.
- bc292937ae6a 8.3.0 cited
-
Major overhaul of btree index code. Eliminate special BTP_CHAIN logic for
- 9e85183bfc31 7.1.1 cited