aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Geoghegan <pg@bowt.ie>2020-04-29 18:17:49 -0700
committerPeter Geoghegan <pg@bowt.ie>2020-04-29 18:17:49 -0700
commitab2343d4cb806c43e8a7269d38b3bdddea185213 (patch)
treecf5dc3220b53420b8c1c32418b619febadba6f6e
parente30b0b5cfaeb4f1f739f82c34c5ae2773852a088 (diff)
downloadpostgresql-ab2343d4cb806c43e8a7269d38b3bdddea185213.tar.gz
postgresql-ab2343d4cb806c43e8a7269d38b3bdddea185213.zip
Remove redundant _bt_killitems() buffer check.
_bt_getbuf() cannot return an invalid buffer. Oversight in commit 2ed5b87f96d.
-rw-r--r--src/backend/access/nbtree/nbtutils.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c
index ce48a51640a..84b391ce038 100644
--- a/src/backend/access/nbtree/nbtutils.c
+++ b/src/backend/access/nbtree/nbtutils.c
@@ -1756,10 +1756,6 @@ _bt_killitems(IndexScanDesc scan)
/* Attempt to re-read the buffer, getting pin and lock. */
buf = _bt_getbuf(scan->indexRelation, so->currPos.currPage, BT_READ);
- /* It might not exist anymore; in which case we can't hint it. */
- if (!BufferIsValid(buf))
- return;
-
page = BufferGetPage(buf);
if (BufferGetLSNAtomic(buf) == so->currPos.lsn)
so->currPos.buf = buf;