From: Alexander Korotkov Date: Fri, 22 Mar 2024 13:25:53 +0000 (+0200) Subject: Fix an oversight in refactoring in 06b10f80ba4. X-Git-Tag: REL_17_BETA1~551 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=b670b93a66fc554714e0fe8e51a944912bb9fd68;p=postgresql.git Fix an oversight in refactoring in 06b10f80ba4. It was against intended skipping prechecking keys optimization in the first page of range queries to not influence point queries performance. Reported-by: Anton Melnikov Discussion: https://postgr.es/m/30cd7524-b9f1-4cf8-9c4a-223eb2e34441%40postgrespro.ru Author: Pavel Borisov --- diff --git a/src/backend/access/nbtree/nbtsearch.c b/src/backend/access/nbtree/nbtsearch.c index 23e723a233c..e3fff90d8e4 100644 --- a/src/backend/access/nbtree/nbtsearch.c +++ b/src/backend/access/nbtree/nbtsearch.c @@ -2498,7 +2498,7 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir) /* * Now load data from the first page of the scan. */ - if (!_bt_readpage(scan, dir, start, false)) + if (!_bt_readpage(scan, dir, start, true)) { /* * There's no actually-matching data on this page. Try to advance to