Skip to content

Commit 2aa5ca9

Browse files
committed
Update comment for _bt_relandgetbuf.
1 parent 40bc4c2 commit 2aa5ca9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/backend/access/nbtree/nbtpage.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtpage.c,v 1.112 2009/01/01 17:23:35 momjian Exp $
12+
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtpage.c,v 1.113 2009/05/05 19:02:22 tgl Exp $
1313
*
1414
* NOTES
1515
* Postgres btree pages look like ordinary relation pages. The opaque
@@ -569,8 +569,12 @@ _bt_getbuf(Relation rel, BlockNumber blkno, int access)
569569
* This is equivalent to _bt_relbuf followed by _bt_getbuf, with the
570570
* exception that blkno may not be P_NEW. Also, if obuf is InvalidBuffer
571571
* then it reduces to just _bt_getbuf; allowing this case simplifies some
572-
* callers. The motivation for using this is to avoid two entries to the
573-
* bufmgr when one will do.
572+
* callers.
573+
*
574+
* The original motivation for using this was to avoid two entries to the
575+
* bufmgr when one would do. However, now it's mainly just a notational
576+
* convenience. The only case where it saves work over _bt_relbuf/_bt_getbuf
577+
* is when the target page is the same one already in the buffer.
574578
*/
575579
Buffer
576580
_bt_relandgetbuf(Relation rel, Buffer obuf, BlockNumber blkno, int access)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy