src/backend/access/hash/hashpage.c
void
_hash_dropscanbuf(Relation rel, HashScanOpaque so)
{
	/* release pin we hold on primary bucket page */
	if (BufferIsValid(so->hashso_bucket_buf) &&
		so->hashso_bucket_buf != so->hashso_curbuf)
		_hash_dropbuf(rel, so->hashso_bucket_buf);
	so->hashso_bucket_buf = InvalidBuffer;

	/* release pin we hold on primary bucket page  of bucket being split */
	if (BufferIsValid(so->hashso_split_bucket_buf) &&
		so->hashso_split_bucket_buf != so->hashso_curbuf)
		_hash_dropbuf(rel, so->hashso_split_bucket_buf);
	so->hashso_split_bucket_buf = InvalidBuffer;

	/* release any pin we still hold */
	if (BufferIsValid(so->hashso_curbuf))
		_hash_dropbuf(rel, so->hashso_curbuf);
	so->hashso_curbuf = InvalidBuffer;

	/* reset split scan */
	so->hashso_buc_populated = false;
	so->hashso_buc_split = false;
}
/*
 *	_hash_dropscanbuf() -- release buffers used in scan.
 *
 * This routine unpins the buffers used during scan on which we
 * hold no lock.
 */
- release buffers used in scan.
This routine unpins the buffers used during scan on which we
hold no lock.
- release buffers used in scan . This routine unpins the buffers used during scan on which we hold no lock .
void
_hash_dropscanbuf(Relation rel, HashScanOpaque so)
{
	if (BufferIsValid(so->hashso_bucket_buf) &&
		so->hashso_bucket_buf != so->hashso_curbuf)
		_hash_dropbuf(rel, so->hashso_bucket_buf);
	so->hashso_bucket_buf = InvalidBuffer;
	if (BufferIsValid(so->hashso_split_bucket_buf) &&
		so->hashso_split_bucket_buf != so->hashso_curbuf)
		_hash_dropbuf(rel, so->hashso_split_bucket_buf);
	so->hashso_split_bucket_buf = InvalidBuffer;
	if (BufferIsValid(so->hashso_curbuf))
		_hash_dropbuf(rel, so->hashso_curbuf);
	so->hashso_curbuf = InvalidBuffer;
	so->hashso_buc_populated = false;
	so->hashso_buc_split = false;
}
void _hash_dropscanbuf ( Relation rel , HashScanOpaque so ) { if ( BufferIsValid ( so -> hashso_bucket_buf ) && so -> hashso_bucket_buf != so -> hashso_curbuf ) _hash_dropbuf ( rel , so -> hashso_bucket_buf ) ; so -> hashso_bucket_buf = InvalidBuffer ; if ( BufferIsValid ( so -> hashso_split_bucket_buf ) && so -> hashso_split_bucket_buf != so -> hashso_curbuf ) _hash_dropbuf ( rel , so -> hashso_split_bucket_buf ) ; so -> hashso_split_bucket_buf = InvalidBuffer ; if ( BufferIsValid ( so -> hashso_curbuf ) ) _hash_dropbuf ( rel , so -> hashso_curbuf ) ; so -> hashso_curbuf = InvalidBuffer ; so -> hashso_buc_populated = false ; so -> hashso_buc_split = false ; }
_hash_dropscanbuf() -- release buffers used in scan.
_hash_dropscanbuf () -- release buffers used in scan .
/* release pin we hold on primary bucket page */ /* release pin we hold on primary bucket page  of bucket being split */ /* release any pin we still hold */ /* reset split scan */