PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "common/cryptohash.h"
#include "common/hashfn.h"
#include "jit/jit.h"
#include "storage/bufmgr.h"
#include "storage/ipc.h"
#include "storage/predicate.h"
#include "storage/proc.h"
#include "utils/memutils.h"
#include "utils/rel.h"
#include "utils/resowner_private.h"
#include "utils/snapmgr.h"
Go to the source code of this file.
Data Structures | |
struct | ResourceArray |
struct | ResourceOwnerData |
struct | ResourceReleaseCallbackItem |
Macros | |
#define | FileGetDatum(file) Int32GetDatum(file) |
#define | DatumGetFile(datum) ((File) DatumGetInt32(datum)) |
#define | BufferGetDatum(buffer) Int32GetDatum(buffer) |
#define | DatumGetBuffer(datum) ((Buffer) DatumGetInt32(datum)) |
#define | RESARRAY_INIT_SIZE 16 |
#define | RESARRAY_MAX_ARRAY 64 |
#define | RESARRAY_IS_ARRAY(resarr) ((resarr)->capacity <= RESARRAY_MAX_ARRAY) |
#define | RESARRAY_MAX_ITEMS(capacity) ((capacity) <= RESARRAY_MAX_ARRAY ? (capacity) : (capacity)/4 * 3) |
#define | MAX_RESOWNER_LOCKS 15 |
Typedefs | |
typedef struct ResourceArray | ResourceArray |
typedef struct ResourceOwnerData | ResourceOwnerData |
typedef struct ResourceReleaseCallbackItem | ResourceReleaseCallbackItem |
Variables | |
ResourceOwner | CurrentResourceOwner = NULL |
ResourceOwner | CurTransactionResourceOwner = NULL |
ResourceOwner | TopTransactionResourceOwner = NULL |
ResourceOwner | AuxProcessResourceOwner = NULL |
static ResourceReleaseCallbackItem * | ResourceRelease_callbacks = NULL |
#define BufferGetDatum | ( | buffer | ) | Int32GetDatum(buffer) |
Definition at line 45 of file resowner.c.
Referenced by ResourceOwnerCreate(), ResourceOwnerForgetBuffer(), and ResourceOwnerRememberBuffer().
#define DatumGetBuffer | ( | datum | ) | ((Buffer) DatumGetInt32(datum)) |
Definition at line 46 of file resowner.c.
Referenced by ResourceOwnerReleaseInternal().
#define DatumGetFile | ( | datum | ) | ((File) DatumGetInt32(datum)) |
Definition at line 44 of file resowner.c.
Referenced by ResourceOwnerReleaseInternal().
#define FileGetDatum | ( | file | ) | Int32GetDatum(file) |
Definition at line 43 of file resowner.c.
Referenced by ResourceOwnerCreate(), ResourceOwnerForgetFile(), and ResourceOwnerRememberFile().
#define MAX_RESOWNER_LOCKS 15 |
Definition at line 109 of file resowner.c.
Referenced by ResourceOwnerDelete(), ResourceOwnerForgetLock(), ResourceOwnerReleaseInternal(), and ResourceOwnerRememberLock().
#define RESARRAY_INIT_SIZE 16 |
Definition at line 78 of file resowner.c.
Referenced by ResourceArrayEnlarge().
#define RESARRAY_IS_ARRAY | ( | resarr | ) | ((resarr)->capacity <= RESARRAY_MAX_ARRAY) |
Definition at line 84 of file resowner.c.
Referenced by ResourceArrayAdd(), ResourceArrayGetAny(), and ResourceArrayRemove().
#define RESARRAY_MAX_ARRAY 64 |
Definition at line 83 of file resowner.c.
#define RESARRAY_MAX_ITEMS | ( | capacity | ) | ((capacity) <= RESARRAY_MAX_ARRAY ? (capacity) : (capacity)/4 * 3) |
Definition at line 90 of file resowner.c.
Referenced by ResourceArrayEnlarge().
typedef struct ResourceArray ResourceArray |
typedef struct ResourceOwnerData ResourceOwnerData |
typedef struct ResourceReleaseCallbackItem ResourceReleaseCallbackItem |
void CreateAuxProcessResourceOwner | ( | void | ) |
Definition at line 875 of file resowner.c.
References Assert, AuxProcessResourceOwner, on_shmem_exit(), ReleaseAuxProcessResourcesCallback(), and ResourceOwnerCreate().
Referenced by AuxiliaryProcessMain(), and InitPostgres().
|
static |
Definition at line 1430 of file resowner.c.
References DatumGetPointer, elog, and WARNING.
Referenced by ResourceOwnerReleaseInternal().
|
static |
Definition at line 1350 of file resowner.c.
References dsm_segment_handle(), elog, and WARNING.
Referenced by ResourceOwnerReleaseInternal().
|
static |
Definition at line 1305 of file resowner.c.
Referenced by ResourceOwnerReleaseInternal().
|
static |
Definition at line 1169 of file resowner.c.
Referenced by ResourceOwnerReleaseInternal().
|
static |
Definition at line 1124 of file resowner.c.
References elog, RelationGetRelationName, and WARNING.
Referenced by ResourceOwnerReleaseInternal().
|
static |
Definition at line 1259 of file resowner.c.
Referenced by ResourceOwnerReleaseInternal().
|
static |
Definition at line 1213 of file resowner.c.
References elog, TupleDescData::tdtypeid, TupleDescData::tdtypmod, and WARNING.
Referenced by ResourceOwnerReleaseInternal().
void RegisterResourceReleaseCallback | ( | ResourceReleaseCallback | callback, |
void * | arg | ||
) |
Definition at line 837 of file resowner.c.
References arg, ResourceReleaseCallbackItem::arg, callback(), ResourceReleaseCallbackItem::callback, MemoryContextAlloc(), ResourceReleaseCallbackItem::next, ResourceRelease_callbacks, and TopMemoryContext.
Referenced by px_find_cipher(), and px_find_digest().
void ReleaseAuxProcessResources | ( | bool | isCommit | ) |
Definition at line 896 of file resowner.c.
References RESOURCE_RELEASE_AFTER_LOCKS, RESOURCE_RELEASE_BEFORE_LOCKS, RESOURCE_RELEASE_LOCKS, and ResourceOwnerRelease().
Referenced by AutoVacLauncherMain(), BackgroundWriterMain(), CheckpointerMain(), InitPostgres(), ReleaseAuxProcessResourcesCallback(), and WalWriterMain().
|
static |
Definition at line 918 of file resowner.c.
References ReleaseAuxProcessResources().
Referenced by CreateAuxProcessResourceOwner().
|
static |
Definition at line 266 of file resowner.c.
References Assert, ResourceArray::capacity, DatumGetUInt32, hash_any(), idx(), ResourceArray::invalidval, ResourceArray::itemsarr, ResourceArray::lastidx, ResourceArray::maxitems, ResourceArray::nitems, RESARRAY_IS_ARRAY, and value.
Referenced by ResourceArrayEnlarge(), ResourceOwnerRememberBuffer(), ResourceOwnerRememberCatCacheListRef(), ResourceOwnerRememberCatCacheRef(), ResourceOwnerRememberCryptoHash(), ResourceOwnerRememberDSM(), ResourceOwnerRememberFile(), ResourceOwnerRememberJIT(), ResourceOwnerRememberPlanCacheRef(), ResourceOwnerRememberRelationRef(), ResourceOwnerRememberSnapshot(), and ResourceOwnerRememberTupleDesc().
|
static |
Definition at line 211 of file resowner.c.
References Assert, ResourceArray::capacity, i, ResourceArray::invalidval, ResourceArray::itemsarr, ResourceArray::maxitems, MemoryContextAlloc(), ResourceArray::nitems, pfree(), RESARRAY_INIT_SIZE, RESARRAY_MAX_ITEMS, ResourceArrayAdd(), and TopMemoryContext.
Referenced by ResourceOwnerEnlargeBuffers(), ResourceOwnerEnlargeCatCacheListRefs(), ResourceOwnerEnlargeCatCacheRefs(), ResourceOwnerEnlargeCryptoHash(), ResourceOwnerEnlargeDSMs(), ResourceOwnerEnlargeFiles(), ResourceOwnerEnlargeJIT(), ResourceOwnerEnlargePlanCacheRefs(), ResourceOwnerEnlargeRelationRefs(), ResourceOwnerEnlargeSnapshots(), and ResourceOwnerEnlargeTupleDescs().
|
static |
Definition at line 405 of file resowner.c.
References ResourceArray::itemsarr, and pfree().
Referenced by ResourceOwnerDelete().
|
static |
Definition at line 373 of file resowner.c.
References ResourceArray::capacity, ResourceArray::invalidval, ResourceArray::itemsarr, ResourceArray::lastidx, ResourceArray::nitems, and RESARRAY_IS_ARRAY.
Referenced by ResourceOwnerReleaseAllPlanCacheRefs(), and ResourceOwnerReleaseInternal().
|
static |
Definition at line 192 of file resowner.c.
References Assert, ResourceArray::capacity, ResourceArray::invalidval, ResourceArray::itemsarr, ResourceArray::maxitems, and ResourceArray::nitems.
Referenced by ResourceOwnerCreate().
|
static |
Definition at line 304 of file resowner.c.
References Assert, ResourceArray::capacity, DatumGetUInt32, hash_any(), i, idx(), ResourceArray::invalidval, ResourceArray::itemsarr, ResourceArray::lastidx, ResourceArray::nitems, and RESARRAY_IS_ARRAY.
Referenced by ResourceOwnerForgetBuffer(), ResourceOwnerForgetCatCacheListRef(), ResourceOwnerForgetCatCacheRef(), ResourceOwnerForgetCryptoHash(), ResourceOwnerForgetDSM(), ResourceOwnerForgetFile(), ResourceOwnerForgetJIT(), ResourceOwnerForgetPlanCacheRef(), ResourceOwnerForgetRelationRef(), ResourceOwnerForgetSnapshot(), and ResourceOwnerForgetTupleDesc().
ResourceOwner ResourceOwnerCreate | ( | ResourceOwner | parent, |
const char * | name | ||
) |
Definition at line 425 of file resowner.c.
References ResourceOwnerData::bufferarr, BufferGetDatum, ResourceOwnerData::catlistrefarr, ResourceOwnerData::catrefarr, ResourceOwnerData::cryptohasharr, ResourceOwnerData::dsmarr, ResourceOwnerData::filearr, FileGetDatum, ResourceOwnerData::firstchild, InvalidBuffer, ResourceOwnerData::jitarr, MemoryContextAllocZero(), ResourceOwnerData::name, name, ResourceOwnerData::nextchild, ResourceOwnerData::parent, ResourceOwnerData::planrefarr, PointerGetDatum, ResourceOwnerData::relrefarr, ResourceArrayInit(), ResourceOwnerData::snapshotarr, TopMemoryContext, and ResourceOwnerData::tupdescarr.
Referenced by AtStart_ResourceOwner(), AtSubStart_ResourceOwner(), CreateAuxProcessResourceOwner(), CreatePortal(), perform_base_backup(), plpgsql_create_econtext(), and plpgsql_inline_handler().
void ResourceOwnerDelete | ( | ResourceOwner | owner | ) |
Definition at line 727 of file resowner.c.
References Assert, ResourceOwnerData::bufferarr, ResourceOwnerData::catlistrefarr, ResourceOwnerData::catrefarr, ResourceOwnerData::cryptohasharr, ResourceOwnerData::dsmarr, ResourceOwnerData::filearr, ResourceOwnerData::firstchild, ResourceOwnerData::jitarr, MAX_RESOWNER_LOCKS, ResourceArray::nitems, ResourceOwnerData::nlocks, pfree(), ResourceOwnerData::planrefarr, ResourceOwnerData::relrefarr, ResourceArrayFree(), ResourceOwnerDelete(), ResourceOwnerNewParent(), ResourceOwnerData::snapshotarr, and ResourceOwnerData::tupdescarr.
Referenced by CleanupSubTransaction(), CleanupTransaction(), CommitSubTransaction(), CommitTransaction(), plpgsql_inline_handler(), PortalDrop(), PrepareTransaction(), ResourceOwnerDelete(), and WalSndResourceCleanup().
void ResourceOwnerEnlargeBuffers | ( | ResourceOwner | owner | ) |
Definition at line 934 of file resowner.c.
References Assert, ResourceOwnerData::bufferarr, and ResourceArrayEnlarge().
Referenced by BgBufferSync(), BufferSync(), FlushDatabaseBuffers(), FlushRelationBuffers(), FlushRelationsAllBuffers(), IncrBufferRefCount(), and ReadBuffer_common().
void ResourceOwnerEnlargeCatCacheListRefs | ( | ResourceOwner | owner | ) |
Definition at line 1058 of file resowner.c.
References ResourceOwnerData::catlistrefarr, and ResourceArrayEnlarge().
Referenced by SearchCatCacheList().
void ResourceOwnerEnlargeCatCacheRefs | ( | ResourceOwner | owner | ) |
Definition at line 1023 of file resowner.c.
References ResourceOwnerData::catrefarr, and ResourceArrayEnlarge().
Referenced by SearchCatCacheInternal(), and SearchCatCacheMiss().
void ResourceOwnerEnlargeCryptoHash | ( | ResourceOwner | owner | ) |
Definition at line 1399 of file resowner.c.
References ResourceOwnerData::cryptohasharr, and ResourceArrayEnlarge().
Referenced by pg_cryptohash_create().
void ResourceOwnerEnlargeDSMs | ( | ResourceOwner | owner | ) |
Definition at line 1319 of file resowner.c.
References ResourceOwnerData::dsmarr, and ResourceArrayEnlarge().
Referenced by dsm_create_descriptor(), and dsm_unpin_mapping().
void ResourceOwnerEnlargeFiles | ( | ResourceOwner | owner | ) |
Definition at line 1274 of file resowner.c.
References ResourceOwnerData::filearr, and ResourceArrayEnlarge().
Referenced by OpenTemporaryFile(), PathNameCreateTemporaryFile(), and PathNameOpenTemporaryFile().
void ResourceOwnerEnlargeJIT | ( | ResourceOwner | owner | ) |
Definition at line 1364 of file resowner.c.
References ResourceOwnerData::jitarr, and ResourceArrayEnlarge().
Referenced by llvm_create_context().
void ResourceOwnerEnlargePlanCacheRefs | ( | ResourceOwner | owner | ) |
Definition at line 1138 of file resowner.c.
References ResourceOwnerData::planrefarr, and ResourceArrayEnlarge().
Referenced by CachedPlanAllowsSimpleValidityCheck(), CachedPlanIsSimplyValid(), and GetCachedPlan().
void ResourceOwnerEnlargeRelationRefs | ( | ResourceOwner | owner | ) |
Definition at line 1093 of file resowner.c.
References ResourceOwnerData::relrefarr, and ResourceArrayEnlarge().
Referenced by RelationIncrementReferenceCount().
void ResourceOwnerEnlargeSnapshots | ( | ResourceOwner | owner | ) |
Definition at line 1228 of file resowner.c.
References ResourceArrayEnlarge(), and ResourceOwnerData::snapshotarr.
Referenced by RegisterSnapshotOnOwner().
void ResourceOwnerEnlargeTupleDescs | ( | ResourceOwner | owner | ) |
Definition at line 1182 of file resowner.c.
References ResourceArrayEnlarge(), and ResourceOwnerData::tupdescarr.
Referenced by IncrTupleDescRefCount().
void ResourceOwnerForgetBuffer | ( | ResourceOwner | owner, |
Buffer | buffer | ||
) |
Definition at line 956 of file resowner.c.
References ResourceOwnerData::bufferarr, BufferGetDatum, elog, ERROR, ResourceOwnerData::name, and ResourceArrayRemove().
Referenced by ReleaseAndReadBuffer(), ReleaseBuffer(), and UnpinBuffer().
void ResourceOwnerForgetCatCacheListRef | ( | ResourceOwner | owner, |
CatCList * | list | ||
) |
Definition at line 1078 of file resowner.c.
References ResourceOwnerData::catlistrefarr, elog, ERROR, ResourceOwnerData::name, PointerGetDatum, and ResourceArrayRemove().
Referenced by ReleaseCatCacheList().
void ResourceOwnerForgetCatCacheRef | ( | ResourceOwner | owner, |
HeapTuple | tuple | ||
) |
Definition at line 1043 of file resowner.c.
References ResourceOwnerData::catrefarr, elog, ERROR, ResourceOwnerData::name, PointerGetDatum, and ResourceArrayRemove().
Referenced by ReleaseCatCache().
void ResourceOwnerForgetCryptoHash | ( | ResourceOwner | owner, |
Datum | handle | ||
) |
Definition at line 1419 of file resowner.c.
References ResourceOwnerData::cryptohasharr, DatumGetPointer, elog, ERROR, ResourceOwnerData::name, and ResourceArrayRemove().
Referenced by pg_cryptohash_free().
void ResourceOwnerForgetDSM | ( | ResourceOwner | owner, |
dsm_segment * | seg | ||
) |
Definition at line 1339 of file resowner.c.
References dsm_segment_handle(), ResourceOwnerData::dsmarr, elog, ERROR, ResourceOwnerData::name, PointerGetDatum, and ResourceArrayRemove().
Referenced by dsm_create(), dsm_detach(), and dsm_pin_mapping().
void ResourceOwnerForgetFile | ( | ResourceOwner | owner, |
File | file | ||
) |
Definition at line 1294 of file resowner.c.
References elog, ERROR, ResourceOwnerData::filearr, FileGetDatum, ResourceOwnerData::name, and ResourceArrayRemove().
Referenced by FileClose().
void ResourceOwnerForgetJIT | ( | ResourceOwner | owner, |
Datum | handle | ||
) |
Definition at line 1384 of file resowner.c.
References DatumGetPointer, elog, ERROR, ResourceOwnerData::jitarr, ResourceOwnerData::name, and ResourceArrayRemove().
Referenced by jit_release_context().
void ResourceOwnerForgetLock | ( | ResourceOwner | owner, |
LOCALLOCK * | locallock | ||
) |
Definition at line 994 of file resowner.c.
References Assert, elog, ERROR, i, ResourceOwnerData::locks, MAX_RESOWNER_LOCKS, ResourceOwnerData::name, and ResourceOwnerData::nlocks.
Referenced by LockReassignOwner(), LockRelease(), LockReleaseAll(), ReleaseLockIfHeld(), and RemoveLocalLock().
void ResourceOwnerForgetPlanCacheRef | ( | ResourceOwner | owner, |
CachedPlan * | plan | ||
) |
Definition at line 1158 of file resowner.c.
References elog, ERROR, ResourceOwnerData::name, ResourceOwnerData::planrefarr, PointerGetDatum, and ResourceArrayRemove().
Referenced by ReleaseCachedPlan().
void ResourceOwnerForgetRelationRef | ( | ResourceOwner | owner, |
Relation | rel | ||
) |
Definition at line 1113 of file resowner.c.
References elog, ERROR, ResourceOwnerData::name, PointerGetDatum, RelationGetRelationName, ResourceOwnerData::relrefarr, and ResourceArrayRemove().
Referenced by RelationDecrementReferenceCount().
void ResourceOwnerForgetSnapshot | ( | ResourceOwner | owner, |
Snapshot | snapshot | ||
) |
Definition at line 1248 of file resowner.c.
References elog, ERROR, ResourceOwnerData::name, PointerGetDatum, ResourceArrayRemove(), and ResourceOwnerData::snapshotarr.
Referenced by UnregisterSnapshotFromOwner().
void ResourceOwnerForgetTupleDesc | ( | ResourceOwner | owner, |
TupleDesc | tupdesc | ||
) |
Definition at line 1202 of file resowner.c.
References elog, ERROR, ResourceOwnerData::name, PointerGetDatum, ResourceArrayRemove(), and ResourceOwnerData::tupdescarr.
Referenced by DecrTupleDescRefCount().
ResourceOwner ResourceOwnerGetParent | ( | ResourceOwner | owner | ) |
Definition at line 780 of file resowner.c.
References ResourceOwnerData::parent.
Referenced by LockReassignCurrentOwner().
void ResourceOwnerNewParent | ( | ResourceOwner | owner, |
ResourceOwner | newparent | ||
) |
Definition at line 789 of file resowner.c.
References Assert, ResourceOwnerData::firstchild, ResourceOwnerData::nextchild, and ResourceOwnerData::parent.
Referenced by AtSubAbort_Portals(), AtSubCommit_Portals(), and ResourceOwnerDelete().
void ResourceOwnerRelease | ( | ResourceOwner | owner, |
ResourceReleasePhase | phase, | ||
bool | isCommit, | ||
bool | isTopLevel | ||
) |
Definition at line 482 of file resowner.c.
References ResourceOwnerReleaseInternal().
Referenced by AbortSubTransaction(), AbortTransaction(), CommitSubTransaction(), CommitTransaction(), PortalDrop(), PrepareTransaction(), ReleaseAuxProcessResources(), and WalSndResourceCleanup().
void ResourceOwnerReleaseAllPlanCacheRefs | ( | ResourceOwner | owner | ) |
Definition at line 704 of file resowner.c.
References CurrentResourceOwner, DatumGetPointer, ResourceOwnerData::planrefarr, ReleaseCachedPlan(), and ResourceArrayGetAny().
Referenced by plpgsql_inline_handler(), and plpgsql_xact_cb().
|
static |
Definition at line 492 of file resowner.c.
References ResourceReleaseCallbackItem::arg, Assert, ResourceOwnerData::bufferarr, ResourceReleaseCallbackItem::callback, ResourceOwnerData::catlistrefarr, ResourceOwnerData::catrefarr, ResourceOwnerData::cryptohasharr, CurrentResourceOwner, DatumGetBuffer, DatumGetFile, DatumGetPointer, DecrTupleDescRefCount(), dsm_detach(), ResourceOwnerData::dsmarr, ResourceOwnerData::filearr, FileClose(), ResourceOwnerData::firstchild, jit_release_context(), ResourceOwnerData::jitarr, LockReassignCurrentOwner(), LockReleaseCurrentOwner(), ResourceOwnerData::locks, MAX_RESOWNER_LOCKS, ResourceReleaseCallbackItem::next, ResourceOwnerData::nextchild, ResourceOwnerData::nlocks, ResourceOwnerData::parent, pg_cryptohash_free(), ResourceOwnerData::planrefarr, PointerGetDatum, PrintBufferLeakWarning(), PrintCatCacheLeakWarning(), PrintCatCacheListLeakWarning(), PrintCryptoHashLeakWarning(), PrintDSMLeakWarning(), PrintFileLeakWarning(), PrintPlanCacheLeakWarning(), PrintRelCacheLeakWarning(), PrintSnapshotLeakWarning(), PrintTupleDescLeakWarning(), ProcReleaseLocks(), RelationClose(), ReleaseBuffer(), ReleaseCachedPlan(), ReleaseCatCache(), ReleaseCatCacheList(), ReleasePredicateLocks(), ResourceOwnerData::relrefarr, RESOURCE_RELEASE_AFTER_LOCKS, RESOURCE_RELEASE_BEFORE_LOCKS, RESOURCE_RELEASE_LOCKS, ResourceArrayGetAny(), ResourceOwnerData::snapshotarr, ResourceOwnerData::tupdescarr, and UnregisterSnapshot().
Referenced by ResourceOwnerRelease().
void ResourceOwnerRememberBuffer | ( | ResourceOwner | owner, |
Buffer | buffer | ||
) |
Definition at line 947 of file resowner.c.
References ResourceOwnerData::bufferarr, BufferGetDatum, and ResourceArrayAdd().
Referenced by IncrBufferRefCount(), LocalBufferAlloc(), PinBuffer(), and PinBuffer_Locked().
void ResourceOwnerRememberCatCacheListRef | ( | ResourceOwner | owner, |
CatCList * | list | ||
) |
Definition at line 1069 of file resowner.c.
References ResourceOwnerData::catlistrefarr, PointerGetDatum, and ResourceArrayAdd().
Referenced by SearchCatCacheList().
void ResourceOwnerRememberCatCacheRef | ( | ResourceOwner | owner, |
HeapTuple | tuple | ||
) |
Definition at line 1034 of file resowner.c.
References ResourceOwnerData::catrefarr, PointerGetDatum, and ResourceArrayAdd().
Referenced by SearchCatCacheInternal(), and SearchCatCacheMiss().
void ResourceOwnerRememberCryptoHash | ( | ResourceOwner | owner, |
Datum | handle | ||
) |
Definition at line 1410 of file resowner.c.
References ResourceOwnerData::cryptohasharr, and ResourceArrayAdd().
Referenced by pg_cryptohash_create().
void ResourceOwnerRememberDSM | ( | ResourceOwner | owner, |
dsm_segment * | seg | ||
) |
Definition at line 1330 of file resowner.c.
References ResourceOwnerData::dsmarr, PointerGetDatum, and ResourceArrayAdd().
Referenced by dsm_create_descriptor(), and dsm_unpin_mapping().
void ResourceOwnerRememberFile | ( | ResourceOwner | owner, |
File | file | ||
) |
Definition at line 1285 of file resowner.c.
References ResourceOwnerData::filearr, FileGetDatum, and ResourceArrayAdd().
Referenced by RegisterTemporaryFile().
void ResourceOwnerRememberJIT | ( | ResourceOwner | owner, |
Datum | handle | ||
) |
Definition at line 1375 of file resowner.c.
References ResourceOwnerData::jitarr, and ResourceArrayAdd().
Referenced by llvm_create_context().
void ResourceOwnerRememberLock | ( | ResourceOwner | owner, |
LOCALLOCK * | locallock | ||
) |
Definition at line 974 of file resowner.c.
References Assert, ResourceOwnerData::locks, MAX_RESOWNER_LOCKS, and ResourceOwnerData::nlocks.
Referenced by GrantLockLocal(), and LockReassignOwner().
void ResourceOwnerRememberPlanCacheRef | ( | ResourceOwner | owner, |
CachedPlan * | plan | ||
) |
Definition at line 1149 of file resowner.c.
References ResourceOwnerData::planrefarr, PointerGetDatum, and ResourceArrayAdd().
Referenced by CachedPlanAllowsSimpleValidityCheck(), CachedPlanIsSimplyValid(), and GetCachedPlan().
void ResourceOwnerRememberRelationRef | ( | ResourceOwner | owner, |
Relation | rel | ||
) |
Definition at line 1104 of file resowner.c.
References PointerGetDatum, ResourceOwnerData::relrefarr, and ResourceArrayAdd().
Referenced by RelationIncrementReferenceCount().
void ResourceOwnerRememberSnapshot | ( | ResourceOwner | owner, |
Snapshot | snapshot | ||
) |
Definition at line 1239 of file resowner.c.
References PointerGetDatum, ResourceArrayAdd(), and ResourceOwnerData::snapshotarr.
Referenced by RegisterSnapshotOnOwner().
void ResourceOwnerRememberTupleDesc | ( | ResourceOwner | owner, |
TupleDesc | tupdesc | ||
) |
Definition at line 1193 of file resowner.c.
References PointerGetDatum, ResourceArrayAdd(), and ResourceOwnerData::tupdescarr.
Referenced by IncrTupleDescRefCount().
void UnregisterResourceReleaseCallback | ( | ResourceReleaseCallback | callback, |
void * | arg | ||
) |
Definition at line 851 of file resowner.c.
References ResourceReleaseCallbackItem::next, and pfree().
ResourceOwner AuxProcessResourceOwner = NULL |
Definition at line 147 of file resowner.c.
Referenced by AutoVacLauncherMain(), CreateAuxProcessResourceOwner(), ShutdownXLOG(), and StartupXLOG().
ResourceOwner CurrentResourceOwner = NULL |
Definition at line 144 of file resowner.c.
Referenced by AssignTransactionId(), AtAbort_ResourceOwner(), AtStart_ResourceOwner(), AtSubAbort_ResourceOwner(), AtSubStart_ResourceOwner(), BgBufferSync(), BufferSync(), cipher_free_callback(), CleanupSubTransaction(), CleanupTransaction(), close_lo_relation(), CommitSubTransaction(), CommitTransaction(), DecrTupleDescRefCount(), digest_free_callback(), dsm_create_descriptor(), dsm_unpin_mapping(), exec_eval_simple_expr(), exec_init_tuple_store(), exec_stmt_block(), extendBufFile(), FlushDatabaseBuffers(), FlushRelationBuffers(), FlushRelationsAllBuffers(), GetCachedPlan(), GetCurrentFDWTuplestore(), IncrBufferRefCount(), IncrTupleDescRefCount(), InitPostgres(), llvm_create_context(), LocalBufferAlloc(), lock_and_open_sequence(), LockAcquireExtended(), LockReassignCurrentOwner(), LockReassignOwner(), LockRelease(), makeBufFileCommon(), MakeTransitionCaptureState(), open_lo_relation(), OpenTemporaryFile(), PathNameCreateTemporaryFile(), PathNameOpenTemporaryFile(), perform_base_backup(), PersistHoldablePortal(), pg_cryptohash_create(), pg_logical_replication_slot_advance(), pg_logical_slot_get_changes_guts(), PinBuffer(), PinBuffer_Locked(), plperl_spi_exec(), plperl_spi_exec_prepared(), plperl_spi_fetchrow(), plperl_spi_prepare(), plperl_spi_query(), plperl_spi_query_prepared(), plpgsql_estate_setup(), pltcl_func_handler(), pltcl_init_tuple_store(), pltcl_returnnext(), pltcl_SPI_execute(), pltcl_SPI_execute_plan(), pltcl_SPI_prepare(), pltcl_subtrans_abort(), pltcl_subtrans_commit(), pltcl_subtransaction(), PLy_abort_open_subtransactions(), PLy_cursor_fetch(), PLy_cursor_iternext(), PLy_cursor_plan(), PLy_cursor_query(), PLy_spi_execute_plan(), PLy_spi_execute_query(), PLy_spi_prepare(), PLy_spi_subtransaction_abort(), PLy_spi_subtransaction_commit(), PLy_subtransaction_enter(), PLy_subtransaction_exit(), PopTransaction(), PortalCleanup(), PortalRun(), PortalRunFetch(), PortalStart(), PrepareTransaction(), px_find_cipher(), px_find_digest(), ReadBuffer_common(), RegisterSnapshot(), RegisterTemporaryFile(), RelationDecrementReferenceCount(), RelationIncrementReferenceCount(), ReleaseAndReadBuffer(), ReleaseBuffer(), ReleaseCachedPlan(), ReleaseCatCache(), ReleaseCatCacheList(), ReleaseLockIfHeld(), ResourceOwnerReleaseAllPlanCacheRefs(), ResourceOwnerReleaseInternal(), SearchCatCacheInternal(), SearchCatCacheList(), SearchCatCacheMiss(), ShutdownXLOG(), SnapBuildClearExportedSnapshot(), SnapBuildExportSnapshot(), StartupXLOG(), tuplestore_begin_common(), tuplestore_puttuple_common(), UnpinBuffer(), UnregisterSnapshot(), and WalSndResourceCleanup().
ResourceOwner CurTransactionResourceOwner = NULL |
Definition at line 145 of file resowner.c.
Referenced by AtStart_ResourceOwner(), AtSubStart_ResourceOwner(), CleanupSubTransaction(), CleanupTransaction(), CommitSubTransaction(), CommitTransaction(), CreatePortal(), GetCurrentFDWTuplestore(), MakeTransitionCaptureState(), PopTransaction(), and PrepareTransaction().
|
static |
Definition at line 159 of file resowner.c.
Referenced by RegisterResourceReleaseCallback().
ResourceOwner TopTransactionResourceOwner = NULL |
Definition at line 146 of file resowner.c.
Referenced by AbortTransaction(), AtAbort_ResourceOwner(), AtStart_ResourceOwner(), CleanupTransaction(), close_lo_relation(), CommitTransaction(), inv_close(), inv_open(), lock_and_open_sequence(), open_lo_relation(), plpgsql_create_econtext(), PortalRun(), and PrepareTransaction().