mirror of
https://github.com/postgres/postgres.git
synced 2025-11-01 21:31:19 +03:00
Make heap_fetch API more consistent by having the buffer remain pinned
in all cases when keep_buf = true. This allows ANALYZE's inner loop to use heap_release_fetch, which saves multiple buffer lookups for the same page and avoids overestimation of cost by the vacuum cost mechanism.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.117 2004/10/15 22:39:49 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.118 2004/10/26 16:05:02 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -269,8 +269,8 @@ _bt_check_unique(Relation rel, BTItem btitem, Relation heapRel,
|
||||
SetBufferCommitInfoNeedsSave(buf);
|
||||
}
|
||||
LockBuffer(hbuffer, BUFFER_LOCK_UNLOCK);
|
||||
ReleaseBuffer(hbuffer);
|
||||
}
|
||||
ReleaseBuffer(hbuffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user