aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-05-05 19:02:22 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-05-05 19:02:22 +0000
commit2aa5ca952f085c5a469cf6b261f39439a22b5970 (patch)
treed5a5d0ac7c1a502d334871df65c373012ef78824
parent40bc4c260508e8a2579bd2106e1f81b6795d147b (diff)
downloadpostgresql-2aa5ca952f085c5a469cf6b261f39439a22b5970.tar.gz
postgresql-2aa5ca952f085c5a469cf6b261f39439a22b5970.zip
Update comment for _bt_relandgetbuf.
-rw-r--r--src/backend/access/nbtree/nbtpage.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c
index bbac1627ef0..0dd4fdae79a 100644
--- a/src/backend/access/nbtree/nbtpage.c
+++ b/src/backend/access/nbtree/nbtpage.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtpage.c,v 1.112 2009/01/01 17:23:35 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtpage.c,v 1.113 2009/05/05 19:02:22 tgl Exp $
*
* NOTES
* Postgres btree pages look like ordinary relation pages. The opaque
@@ -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)