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

Function GetPrivateRefCount

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

* Returns how many times the passed buffer is pinned by this backend. * * Only works for shared memory buffers! */

Source from the content-addressed store, hash-verified

400 * Only works for shared memory buffers!
401 */
402static inline int32
403GetPrivateRefCount(Buffer buffer)
404{
405 PrivateRefCountEntry *ref;
406
407 Assert(BufferIsValid(buffer));
408 Assert(!BufferIsLocal(buffer));
409
410 /*
411 * Not moving the entry - that's ok for the current users, but we might
412 * want to change this one day.
413 */
414 ref = GetPrivateRefCountEntry(buffer, false);
415
416 if (ref == NULL)
417 return 0;
418 return ref->refcount;
419}
420
421/*
422 * Release resources used to track the reference count of a buffer which we no

Callers 10

ReadRecentBufferFunction · 0.85
InvalidateBufferFunction · 0.85
PrintBufferLeakWarningFunction · 0.85
PrintBufferDescsFunction · 0.85
PrintPinnedBufsFunction · 0.85
MarkBufferDirtyHintFunction · 0.85
LockBufferForCleanupFunction · 0.85
IsBufferCleanupOKFunction · 0.85

Calls 1

GetPrivateRefCountEntryFunction · 0.85

Tested by

no test coverage detected