mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
Tweak hash index AM to use the new ReadOrZeroBuffer bufmgr API when fetching
pages it intends to zero immediately. Just to show there is some use for that function besides WAL recovery :-). Along the way, fold _hash_checkpage and _hash_pageinit calls into _hash_getbuf and friends, instead of expecting callers to do that separately.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/access/hash.h,v 1.79 2007/04/19 20:24:04 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/access/hash.h,v 1.80 2007/05/03 16:45:58 tgl Exp $
|
||||
*
|
||||
* NOTES
|
||||
* modeled after Margo Seltzer's hash implementation for unix.
|
||||
@@ -283,8 +283,10 @@ extern void _hash_squeezebucket(Relation rel,
|
||||
extern void _hash_getlock(Relation rel, BlockNumber whichlock, int access);
|
||||
extern bool _hash_try_getlock(Relation rel, BlockNumber whichlock, int access);
|
||||
extern void _hash_droplock(Relation rel, BlockNumber whichlock, int access);
|
||||
extern Buffer _hash_getbuf(Relation rel, BlockNumber blkno, int access);
|
||||
extern Buffer _hash_getnewbuf(Relation rel, BlockNumber blkno, int access);
|
||||
extern Buffer _hash_getbuf(Relation rel, BlockNumber blkno,
|
||||
int access, int flags);
|
||||
extern Buffer _hash_getinitbuf(Relation rel, BlockNumber blkno);
|
||||
extern Buffer _hash_getnewbuf(Relation rel, BlockNumber blkno);
|
||||
extern void _hash_relbuf(Relation rel, Buffer buf);
|
||||
extern void _hash_dropbuf(Relation rel, Buffer buf);
|
||||
extern void _hash_wrtbuf(Relation rel, Buffer buf);
|
||||
|
||||
Reference in New Issue
Block a user