summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2009-05-05 19:02:22 +0000
committerTom Lane2009-05-05 19:02:22 +0000
commit02b4d096a7fbbb1480fa8352adaf8b1c6d1b4996 (patch)
tree1581b8e510fba81607b85eb17ee1b00b9ef4b672
parent4e9d3d84674f552d2fb6c564cd15bef694a75287 (diff)
Update comment for _bt_relandgetbuf.
-rw-r--r--src/backend/access/nbtree/nbtpage.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c
index 23026c2905..901b2b50d4 100644
--- a/src/backend/access/nbtree/nbtpage.c
+++ b/src/backend/access/nbtree/nbtpage.c
@@ -569,8 +569,12 @@ _bt_getbuf(Relation rel, BlockNumber blkno, int access)
* This is equivalent to _bt_relbuf followed by _bt_getbuf, with the
* exception that blkno may not be P_NEW. Also, if obuf is InvalidBuffer
* then it reduces to just _bt_getbuf; allowing this case simplifies some
- * callers. The motivation for using this is to avoid two entries to the
- * bufmgr when one will do.
+ * callers.
+ *
+ * The original motivation for using this was to avoid two entries to the
+ * bufmgr when one would do. However, now it's mainly just a notational
+ * convenience. The only case where it saves work over _bt_relbuf/_bt_getbuf
+ * is when the target page is the same one already in the buffer.
*/
Buffer
_bt_relandgetbuf(Relation rel, Buffer obuf, BlockNumber blkno, int access)