|
12 | 12 | * Portions Copyright (c) 1994, Regents of the University of California
|
13 | 13 | *
|
14 | 14 | * IDENTIFICATION
|
15 |
| - * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtree.c,v 1.121 2004/11/11 00:32:50 neilc Exp $ |
| 15 | + * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtree.c,v 1.122 2004/11/17 03:13:38 neilc Exp $ |
16 | 16 | *
|
17 | 17 | *-------------------------------------------------------------------------
|
18 | 18 | */
|
@@ -477,8 +477,8 @@ btmarkpos(PG_FUNCTION_ARGS)
|
477 | 477 | /* bump pin on current buffer for assignment to mark buffer */
|
478 | 478 | if (ItemPointerIsValid(&(scan->currentItemData)))
|
479 | 479 | {
|
480 |
| - so->btso_mrkbuf = ReadBuffer(scan->indexRelation, |
481 |
| - BufferGetBlockNumber(so->btso_curbuf)); |
| 480 | + IncrBufferRefCount(so->btso_curbuf); |
| 481 | + so->btso_mrkbuf = so->btso_curbuf; |
482 | 482 | scan->currentMarkData = scan->currentItemData;
|
483 | 483 | so->mrkHeapIptr = so->curHeapIptr;
|
484 | 484 | }
|
@@ -509,8 +509,8 @@ btrestrpos(PG_FUNCTION_ARGS)
|
509 | 509 | /* bump pin on marked buffer */
|
510 | 510 | if (ItemPointerIsValid(&(scan->currentMarkData)))
|
511 | 511 | {
|
512 |
| - so->btso_curbuf = ReadBuffer(scan->indexRelation, |
513 |
| - BufferGetBlockNumber(so->btso_mrkbuf)); |
| 512 | + IncrBufferRefCount(so->btso_mrkbuf); |
| 513 | + so->btso_curbuf = so->btso_mrkbuf; |
514 | 514 | scan->currentItemData = scan->currentMarkData;
|
515 | 515 | so->curHeapIptr = so->mrkHeapIptr;
|
516 | 516 | }
|
|
0 commit comments