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

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

	buf = ReadBuffer(rel, blkno);

	if (!ConditionalLockBufferForCleanup(buf))
	{
		ReleaseBuffer(buf);
		return InvalidBuffer;
	}

	/* ref count and lock type are correct */

	_hash_checkpage(rel, buf, flags);

	return buf;
}
/*
 * _hash_getbuf_with_condlock_cleanup() -- Try to get a buffer for cleanup.
 *
 *		We read the page and try to acquire a cleanup lock.  If we get it,
 *		we return the buffer; otherwise, we return InvalidBuffer.
 */
- Try to get a buffer for cleanup.
We read the page and try to acquire a cleanup lock.  If we get it,
we return the buffer; otherwise, we return InvalidBuffer.
- Try to get a buffer for cleanup . We read the page and try to acquire a cleanup lock . If we get it we return the buffer ; otherwise we return InvalidBuffer .
Buffer
_hash_getbuf_with_condlock_cleanup(Relation rel, BlockNumber blkno, int flags)
{
	Buffer		buf;
	if (blkno == P_NEW)
		elog(ERROR, "hash AM does not use P_NEW");
	buf = ReadBuffer(rel, blkno);
	if (!ConditionalLockBufferForCleanup(buf))
	{
		ReleaseBuffer(buf);
		return InvalidBuffer;
	}
	_hash_checkpage(rel, buf, flags);
	return buf;
}
Buffer _hash_getbuf_with_condlock_cleanup ( Relation rel , BlockNumber blkno , int flags ) { Buffer buf ; if ( blkno == P_NEW ) elog ( ERROR , " " ) ; buf = ReadBuffer ( rel , blkno ) ; if ( ! ConditionalLockBufferForCleanup ( buf ) ) { ReleaseBuffer ( buf ) ; return InvalidBuffer ; } _hash_checkpage ( rel , buf , flags ) ; return buf ; }
_hash_getbuf_with_condlock_cleanup() -- Try to get a buffer for cleanup.
_hash_getbuf_with_condlock_cleanup () -- Try to get a buffer for cleanup .
/* ref count and lock type are correct */