MCPcopy Create free account
hub / github.com/apache/cloudberry / IncrBufferRefCount

Function IncrBufferRefCount

src/backend/storage/buffer/bufmgr.c:4018–4034  ·  view source on GitHub ↗

* IncrBufferRefCount * Increment the pin count on a buffer that we have *already* pinned * at least once. * * This function cannot be used on a buffer we do not have pinned, * because it doesn't change the shared buffer state. */

Source from the content-addressed store, hash-verified

4016 * because it doesn't change the shared buffer state.
4017 */
4018void
4019IncrBufferRefCount(Buffer buffer)
4020{
4021 Assert(BufferIsPinned(buffer));
4022 ResourceOwnerEnlargeBuffers(CurrentResourceOwner);
4023 if (BufferIsLocal(buffer))
4024 LocalRefCount[-buffer - 1]++;
4025 else
4026 {
4027 PrivateRefCountEntry *ref;
4028
4029 ref = GetPrivateRefCountEntry(buffer, true);
4030 Assert(ref != NULL);
4031 ref->refcount++;
4032 }
4033 ResourceOwnerRememberBuffer(CurrentResourceOwner, buffer);
4034}
4035
4036/*
4037 * MarkBufferDirtyHint

Callers 9

scanPostingTreeFunction · 0.85
startScanEntryFunction · 0.85
entryLoadMoreItemsFunction · 0.85
ReadBufferBIFunction · 0.85
bmmarkposFunction · 0.85
bmrestrposFunction · 0.85
_bt_steppageFunction · 0.85
btrestrposFunction · 0.85

Calls 3

GetPrivateRefCountEntryFunction · 0.85

Tested by

no test coverage detected