Re: Bug in nbtree optimization to skip > operator comparisons (or < comparisons in backwards scans)
Alexander Korotkov <aekorotkov@gmail.com>
From: Alexander Korotkov <aekorotkov@gmail.com>
To: Peter Geoghegan <pg@bowt.ie>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Heikki Linnakangas <hlinnaka@iki.fi>,
Matthias van de Meent <boekewurm+postgres@gmail.com>
Date: 2023-12-11T18:59:32Z
Lists: pgsql-hackers
Attachments
- 0001-Remove-BTScanOpaqueData.firstPage-v2.patch (application/octet-stream) patch v2-0001
- 0002-Fix-requiredOppositeDir-bug-v2.patch (application/octet-stream) patch v2-0002
On Mon, Dec 11, 2023 at 5:56 PM Alexander Korotkov <aekorotkov@gmail.com> wrote: > > BTW, do we really need to keep around the BTScanOpaqueData.firstPage > > field? Why can't the call to _bt_readpage from _bt_first (and from > > _bt_endpoint) just pass "firstPage=true" as a simple argument? Note > > that the first call to _bt_readpage must take place from _bt_first (or > > from _bt_endpoint). The first _bt_first call is already kind of > > special, in a way that is directly related to this issue. I added some > > comments about that to today's commit c9c0589fda, in fact -- I think > > it's an important issue in general. > > Please, check the attached patchset. Sorry, I forgot the attachment. Here it is. ------ Regards, Alexander Korotkov
Commits
-
Fix an oversight in refactoring in 06b10f80ba4.
- b670b93a66fc 17.0 landed
-
Make RangeTblEntry dump order consistent
- b4080fa3dcf6 17.0 cited
-
Improvements and fixes for e0b1ee17dc
- 7e6fb5da41d8 17.0 landed
-
Remove BTScanOpaqueData.firstPage
- 06b10f80ba4d 17.0 landed
-
Optimize nbtree backward scan boundary cases.
- c9c0589fda0e 17.0 cited
-
Skip checking of scan keys required for directional scan in B-tree
- e0b1ee17dc3a 17.0 cited