src/backend/access/hash/hashpage.c
Buffer
_hash_getbuf(Relation rel, BlockNumber blkno, int access, int flags)
{
	Buffer		buf;

	if (blkno == P_NEW)
		elog(ERROR, "hash AM does not use P_NEW");

	buf = ReadBuffer(rel, blkno);

	if (access != HASH_NOLOCK)
		LockBuffer(buf, access);

	/* ref count and lock type are correct */

	_hash_checkpage(rel, buf, flags);

	return buf;
}
/*
 *	_hash_getbuf() -- Get a buffer by block number for read or write.
 *
 *		'access' must be HASH_READ, HASH_WRITE, or HASH_NOLOCK.
 *		'flags' is a bitwise OR of the allowed page types.
 *
 *		This must be used only to fetch pages that are expected to be valid
 *		already.  _hash_checkpage() is applied using the given flags.
 *
 *		When this routine returns, the appropriate lock is set on the
 *		requested buffer and its reference count has been incremented
 *		(ie, the buffer is "locked and pinned").
 *
 *		P_NEW is disallowed because this routine can only be used
 *		to access pages that are known to be before the filesystem EOF.
 *		Extending the index should be done with _hash_getnewbuf.
 */
- Get a buffer by block number for read or write.

This must be used only to fetch pages that are expected to be valid
already.  _hash_checkpage() is applied using the given flags.

When this routine returns, the appropriate lock is set on the
requested buffer and its reference count has been incremented
.

P_NEW is disallowed because this routine can only be used
to access pages that are known to be before the filesystem EOF.
Extending the index should be done with _hash_getnewbuf.
- Get a buffer by block number for read or write . This must be used only to fetch pages that are expected to be valid already . _hash_checkpage () is applied using the given flags . When this routine returns the appropriate lock is set on the requested buffer and its reference count has been incremented . P_NEW is disallowed because this routine can only be used to access pages that are known to be before the filesystem EOF . Extending the index should be done with _hash_getnewbuf .
Buffer
_hash_getbuf(Relation rel, BlockNumber blkno, int access, int flags)
{
	Buffer		buf;
	if (blkno == P_NEW)
		elog(ERROR, "hash AM does not use P_NEW");
	buf = ReadBuffer(rel, blkno);
	if (access != HASH_NOLOCK)
		LockBuffer(buf, access);
	_hash_checkpage(rel, buf, flags);
	return buf;
}
Buffer _hash_getbuf ( Relation rel , BlockNumber blkno , int access , int flags ) { Buffer buf ; if ( blkno == P_NEW ) elog ( ERROR , " " ) ; buf = ReadBuffer ( rel , blkno ) ; if ( access != HASH_NOLOCK ) LockBuffer ( buf , access ) ; _hash_checkpage ( rel , buf , flags ) ; return buf ; }
_hash_getbuf() -- Get a buffer by block number for read or write.
_hash_getbuf () -- Get a buffer by block number for read or write .
/* ref count and lock type are correct */