PostgreSQL Source Code  git master
resowner_private.h File Reference
#include "storage/dsm.h"
#include "storage/fd.h"
#include "storage/lock.h"
#include "utils/catcache.h"
#include "utils/plancache.h"
#include "utils/resowner.h"
#include "utils/snapshot.h"
Include dependency graph for resowner_private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void ResourceOwnerEnlargeBuffers (ResourceOwner owner)
 
void ResourceOwnerRememberBuffer (ResourceOwner owner, Buffer buffer)
 
void ResourceOwnerForgetBuffer (ResourceOwner owner, Buffer buffer)
 
void ResourceOwnerRememberLock (ResourceOwner owner, LOCALLOCK *locallock)
 
void ResourceOwnerForgetLock (ResourceOwner owner, LOCALLOCK *locallock)
 
void ResourceOwnerEnlargeCatCacheRefs (ResourceOwner owner)
 
void ResourceOwnerRememberCatCacheRef (ResourceOwner owner, HeapTuple tuple)
 
void ResourceOwnerForgetCatCacheRef (ResourceOwner owner, HeapTuple tuple)
 
void ResourceOwnerEnlargeCatCacheListRefs (ResourceOwner owner)
 
void ResourceOwnerRememberCatCacheListRef (ResourceOwner owner, CatCList *list)
 
void ResourceOwnerForgetCatCacheListRef (ResourceOwner owner, CatCList *list)
 
void ResourceOwnerEnlargeRelationRefs (ResourceOwner owner)
 
void ResourceOwnerRememberRelationRef (ResourceOwner owner, Relation rel)
 
void ResourceOwnerForgetRelationRef (ResourceOwner owner, Relation rel)
 
void ResourceOwnerEnlargePlanCacheRefs (ResourceOwner owner)
 
void ResourceOwnerRememberPlanCacheRef (ResourceOwner owner, CachedPlan *plan)
 
void ResourceOwnerForgetPlanCacheRef (ResourceOwner owner, CachedPlan *plan)
 
void ResourceOwnerEnlargeTupleDescs (ResourceOwner owner)
 
void ResourceOwnerRememberTupleDesc (ResourceOwner owner, TupleDesc tupdesc)
 
void ResourceOwnerForgetTupleDesc (ResourceOwner owner, TupleDesc tupdesc)
 
void ResourceOwnerEnlargeSnapshots (ResourceOwner owner)
 
void ResourceOwnerRememberSnapshot (ResourceOwner owner, Snapshot snapshot)
 
void ResourceOwnerForgetSnapshot (ResourceOwner owner, Snapshot snapshot)
 
void ResourceOwnerEnlargeFiles (ResourceOwner owner)
 
void ResourceOwnerRememberFile (ResourceOwner owner, File file)
 
void ResourceOwnerForgetFile (ResourceOwner owner, File file)
 
void ResourceOwnerEnlargeDSMs (ResourceOwner owner)
 
void ResourceOwnerRememberDSM (ResourceOwner owner, dsm_segment *)
 
void ResourceOwnerForgetDSM (ResourceOwner owner, dsm_segment *)
 

Function Documentation

◆ ResourceOwnerEnlargeBuffers()

void ResourceOwnerEnlargeBuffers ( ResourceOwner  owner)

Definition at line 825 of file resowner.c.

References ResourceOwnerData::bufferarr, and ResourceArrayEnlarge().

Referenced by BgBufferSync(), BufferSync(), FlushDatabaseBuffers(), FlushRelationBuffers(), IncrBufferRefCount(), and ReadBuffer_common().

826 {
827  if (owner == NULL)
828  return;
829  ResourceArrayEnlarge(&(owner->bufferarr));
830 }
static void ResourceArrayEnlarge(ResourceArray *resarr)
Definition: resowner.c:202
ResourceArray bufferarr
Definition: resowner.c:118

◆ ResourceOwnerEnlargeCatCacheListRefs()

void ResourceOwnerEnlargeCatCacheListRefs ( ResourceOwner  owner)

Definition at line 959 of file resowner.c.

References ResourceOwnerData::catlistrefarr, and ResourceArrayEnlarge().

Referenced by SearchCatCacheList().

960 {
962 }
static void ResourceArrayEnlarge(ResourceArray *resarr)
Definition: resowner.c:202
ResourceArray catlistrefarr
Definition: resowner.c:120

◆ ResourceOwnerEnlargeCatCacheRefs()

void ResourceOwnerEnlargeCatCacheRefs ( ResourceOwner  owner)

Definition at line 924 of file resowner.c.

References ResourceOwnerData::catrefarr, and ResourceArrayEnlarge().

Referenced by SearchCatCacheInternal(), and SearchCatCacheMiss().

925 {
926  ResourceArrayEnlarge(&(owner->catrefarr));
927 }
static void ResourceArrayEnlarge(ResourceArray *resarr)
Definition: resowner.c:202
ResourceArray catrefarr
Definition: resowner.c:119

◆ ResourceOwnerEnlargeDSMs()

void ResourceOwnerEnlargeDSMs ( ResourceOwner  owner)

Definition at line 1220 of file resowner.c.

References ResourceOwnerData::dsmarr, and ResourceArrayEnlarge().

Referenced by dsm_create_descriptor(), and dsm_unpin_mapping().

1221 {
1222  ResourceArrayEnlarge(&(owner->dsmarr));
1223 }
static void ResourceArrayEnlarge(ResourceArray *resarr)
Definition: resowner.c:202
ResourceArray dsmarr
Definition: resowner.c:126

◆ ResourceOwnerEnlargeFiles()

void ResourceOwnerEnlargeFiles ( ResourceOwner  owner)

Definition at line 1175 of file resowner.c.

References ResourceOwnerData::filearr, and ResourceArrayEnlarge().

Referenced by OpenTemporaryFile(), PathNameCreateTemporaryFile(), and PathNameOpenTemporaryFile().

1176 {
1177  ResourceArrayEnlarge(&(owner->filearr));
1178 }
static void ResourceArrayEnlarge(ResourceArray *resarr)
Definition: resowner.c:202
ResourceArray filearr
Definition: resowner.c:125

◆ ResourceOwnerEnlargePlanCacheRefs()

void ResourceOwnerEnlargePlanCacheRefs ( ResourceOwner  owner)

Definition at line 1039 of file resowner.c.

References ResourceOwnerData::planrefarr, and ResourceArrayEnlarge().

Referenced by GetCachedPlan().

1040 {
1041  ResourceArrayEnlarge(&(owner->planrefarr));
1042 }
static void ResourceArrayEnlarge(ResourceArray *resarr)
Definition: resowner.c:202
ResourceArray planrefarr
Definition: resowner.c:122

◆ ResourceOwnerEnlargeRelationRefs()

void ResourceOwnerEnlargeRelationRefs ( ResourceOwner  owner)

Definition at line 994 of file resowner.c.

References ResourceOwnerData::relrefarr, and ResourceArrayEnlarge().

Referenced by RelationIncrementReferenceCount().

995 {
996  ResourceArrayEnlarge(&(owner->relrefarr));
997 }
static void ResourceArrayEnlarge(ResourceArray *resarr)
Definition: resowner.c:202
ResourceArray relrefarr
Definition: resowner.c:121

◆ ResourceOwnerEnlargeSnapshots()

void ResourceOwnerEnlargeSnapshots ( ResourceOwner  owner)

Definition at line 1129 of file resowner.c.

References ResourceArrayEnlarge(), and ResourceOwnerData::snapshotarr.

Referenced by RegisterSnapshotOnOwner().

1130 {
1131  ResourceArrayEnlarge(&(owner->snapshotarr));
1132 }
static void ResourceArrayEnlarge(ResourceArray *resarr)
Definition: resowner.c:202
ResourceArray snapshotarr
Definition: resowner.c:124

◆ ResourceOwnerEnlargeTupleDescs()

void ResourceOwnerEnlargeTupleDescs ( ResourceOwner  owner)

Definition at line 1083 of file resowner.c.

References ResourceArrayEnlarge(), and ResourceOwnerData::tupdescarr.

Referenced by IncrTupleDescRefCount().

1084 {
1085  ResourceArrayEnlarge(&(owner->tupdescarr));
1086 }
static void ResourceArrayEnlarge(ResourceArray *resarr)
Definition: resowner.c:202
ResourceArray tupdescarr
Definition: resowner.c:123

◆ ResourceOwnerForgetBuffer()

void ResourceOwnerForgetBuffer ( ResourceOwner  owner,
Buffer  buffer 
)

Definition at line 855 of file resowner.c.

References ResourceOwnerData::bufferarr, BufferGetDatum, elog, ERROR, ResourceOwnerData::name, and ResourceArrayRemove().

Referenced by ReleaseAndReadBuffer(), ReleaseBuffer(), and UnpinBuffer().

856 {
857  if (owner == NULL)
858  return;
860  elog(ERROR, "buffer %d is not owned by resource owner %s",
861  buffer, owner->name);
862 }
ResourceArray bufferarr
Definition: resowner.c:118
const char * name
Definition: resowner.c:115
#define ERROR
Definition: elog.h:43
#define BufferGetDatum(buffer)
Definition: resowner.c:41
WalTimeSample buffer[LAG_TRACKER_BUFFER_SIZE]
Definition: walsender.c:214
static bool ResourceArrayRemove(ResourceArray *resarr, Datum value)
Definition: resowner.c:295
#define elog
Definition: elog.h:219

◆ ResourceOwnerForgetCatCacheListRef()

void ResourceOwnerForgetCatCacheListRef ( ResourceOwner  owner,
CatCList list 
)

Definition at line 979 of file resowner.c.

References ResourceOwnerData::catlistrefarr, elog, ERROR, ResourceOwnerData::name, PointerGetDatum, and ResourceArrayRemove().

Referenced by ReleaseCatCacheList().

980 {
981  if (!ResourceArrayRemove(&(owner->catlistrefarr), PointerGetDatum(list)))
982  elog(ERROR, "catcache list reference %p is not owned by resource owner %s",
983  list, owner->name);
984 }
#define PointerGetDatum(X)
Definition: postgres.h:562
const char * name
Definition: resowner.c:115
#define ERROR
Definition: elog.h:43
static bool ResourceArrayRemove(ResourceArray *resarr, Datum value)
Definition: resowner.c:295
ResourceArray catlistrefarr
Definition: resowner.c:120
#define elog
Definition: elog.h:219

◆ ResourceOwnerForgetCatCacheRef()

void ResourceOwnerForgetCatCacheRef ( ResourceOwner  owner,
HeapTuple  tuple 
)

Definition at line 944 of file resowner.c.

References ResourceOwnerData::catrefarr, elog, ERROR, ResourceOwnerData::name, PointerGetDatum, and ResourceArrayRemove().

Referenced by ReleaseCatCache().

945 {
946  if (!ResourceArrayRemove(&(owner->catrefarr), PointerGetDatum(tuple)))
947  elog(ERROR, "catcache reference %p is not owned by resource owner %s",
948  tuple, owner->name);
949 }
ResourceArray catrefarr
Definition: resowner.c:119
#define PointerGetDatum(X)
Definition: postgres.h:562
const char * name
Definition: resowner.c:115
#define ERROR
Definition: elog.h:43
static bool ResourceArrayRemove(ResourceArray *resarr, Datum value)
Definition: resowner.c:295
#define elog
Definition: elog.h:219

◆ ResourceOwnerForgetDSM()

void ResourceOwnerForgetDSM ( ResourceOwner  owner,
dsm_segment  
)

Definition at line 1240 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().

1241 {
1242  if (!ResourceArrayRemove(&(owner->dsmarr), PointerGetDatum(seg)))
1243  elog(ERROR, "dynamic shared memory segment %u is not owned by resource owner %s",
1244  dsm_segment_handle(seg), owner->name);
1245 }
#define PointerGetDatum(X)
Definition: postgres.h:562
dsm_handle dsm_segment_handle(dsm_segment *seg)
Definition: dsm.c:1015
const char * name
Definition: resowner.c:115
#define ERROR
Definition: elog.h:43
static bool ResourceArrayRemove(ResourceArray *resarr, Datum value)
Definition: resowner.c:295
ResourceArray dsmarr
Definition: resowner.c:126
#define elog
Definition: elog.h:219

◆ ResourceOwnerForgetFile()

void ResourceOwnerForgetFile ( ResourceOwner  owner,
File  file 
)

Definition at line 1195 of file resowner.c.

References elog, ERROR, ResourceOwnerData::filearr, FileGetDatum, ResourceOwnerData::name, and ResourceArrayRemove().

Referenced by FileClose().

1196 {
1197  if (!ResourceArrayRemove(&(owner->filearr), FileGetDatum(file)))
1198  elog(ERROR, "temporary file %d is not owned by resource owner %s",
1199  file, owner->name);
1200 }
const char * name
Definition: resowner.c:115
#define ERROR
Definition: elog.h:43
#define FileGetDatum(file)
Definition: resowner.c:39
static bool ResourceArrayRemove(ResourceArray *resarr, Datum value)
Definition: resowner.c:295
#define elog
Definition: elog.h:219
ResourceArray filearr
Definition: resowner.c:125

◆ ResourceOwnerForgetLock()

void ResourceOwnerForgetLock ( ResourceOwner  owner,
LOCALLOCK locallock 
)

Definition at line 895 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().

896 {
897  int i;
898 
899  if (owner->nlocks > MAX_RESOWNER_LOCKS)
900  return; /* we have overflowed */
901 
902  Assert(owner->nlocks > 0);
903  for (i = owner->nlocks - 1; i >= 0; i--)
904  {
905  if (locallock == owner->locks[i])
906  {
907  owner->locks[i] = owner->locks[owner->nlocks - 1];
908  owner->nlocks--;
909  return;
910  }
911  }
912  elog(ERROR, "lock reference %p is not owned by resource owner %s",
913  locallock, owner->name);
914 }
#define MAX_RESOWNER_LOCKS
Definition: resowner.c:105
const char * name
Definition: resowner.c:115
#define ERROR
Definition: elog.h:43
#define Assert(condition)
Definition: c.h:680
LOCALLOCK * locks[MAX_RESOWNER_LOCKS]
Definition: resowner.c:130
int i
#define elog
Definition: elog.h:219

◆ ResourceOwnerForgetPlanCacheRef()

void ResourceOwnerForgetPlanCacheRef ( ResourceOwner  owner,
CachedPlan plan 
)

Definition at line 1059 of file resowner.c.

References elog, ERROR, ResourceOwnerData::name, ResourceOwnerData::planrefarr, PointerGetDatum, and ResourceArrayRemove().

Referenced by ReleaseCachedPlan().

1060 {
1061  if (!ResourceArrayRemove(&(owner->planrefarr), PointerGetDatum(plan)))
1062  elog(ERROR, "plancache reference %p is not owned by resource owner %s",
1063  plan, owner->name);
1064 }
#define PointerGetDatum(X)
Definition: postgres.h:562
const char * name
Definition: resowner.c:115
#define ERROR
Definition: elog.h:43
ResourceArray planrefarr
Definition: resowner.c:122
static bool ResourceArrayRemove(ResourceArray *resarr, Datum value)
Definition: resowner.c:295
#define elog
Definition: elog.h:219

◆ ResourceOwnerForgetRelationRef()

void ResourceOwnerForgetRelationRef ( ResourceOwner  owner,
Relation  rel 
)

Definition at line 1014 of file resowner.c.

References elog, ERROR, ResourceOwnerData::name, PointerGetDatum, RelationGetRelationName, ResourceOwnerData::relrefarr, and ResourceArrayRemove().

Referenced by RelationDecrementReferenceCount().

1015 {
1016  if (!ResourceArrayRemove(&(owner->relrefarr), PointerGetDatum(rel)))
1017  elog(ERROR, "relcache reference %s is not owned by resource owner %s",
1018  RelationGetRelationName(rel), owner->name);
1019 }
ResourceArray relrefarr
Definition: resowner.c:121
#define PointerGetDatum(X)
Definition: postgres.h:562
const char * name
Definition: resowner.c:115
#define ERROR
Definition: elog.h:43
#define RelationGetRelationName(relation)
Definition: rel.h:445
static bool ResourceArrayRemove(ResourceArray *resarr, Datum value)
Definition: resowner.c:295
#define elog
Definition: elog.h:219

◆ ResourceOwnerForgetSnapshot()

void ResourceOwnerForgetSnapshot ( ResourceOwner  owner,
Snapshot  snapshot 
)

Definition at line 1149 of file resowner.c.

References elog, ERROR, ResourceOwnerData::name, PointerGetDatum, ResourceArrayRemove(), and ResourceOwnerData::snapshotarr.

Referenced by UnregisterSnapshotFromOwner().

1150 {
1151  if (!ResourceArrayRemove(&(owner->snapshotarr), PointerGetDatum(snapshot)))
1152  elog(ERROR, "snapshot reference %p is not owned by resource owner %s",
1153  snapshot, owner->name);
1154 }
#define PointerGetDatum(X)
Definition: postgres.h:562
ResourceArray snapshotarr
Definition: resowner.c:124
const char * name
Definition: resowner.c:115
#define ERROR
Definition: elog.h:43
static bool ResourceArrayRemove(ResourceArray *resarr, Datum value)
Definition: resowner.c:295
#define elog
Definition: elog.h:219

◆ ResourceOwnerForgetTupleDesc()

void ResourceOwnerForgetTupleDesc ( ResourceOwner  owner,
TupleDesc  tupdesc 
)

Definition at line 1103 of file resowner.c.

References elog, ERROR, ResourceOwnerData::name, PointerGetDatum, ResourceArrayRemove(), and ResourceOwnerData::tupdescarr.

Referenced by DecrTupleDescRefCount().

1104 {
1105  if (!ResourceArrayRemove(&(owner->tupdescarr), PointerGetDatum(tupdesc)))
1106  elog(ERROR, "tupdesc reference %p is not owned by resource owner %s",
1107  tupdesc, owner->name);
1108 }
#define PointerGetDatum(X)
Definition: postgres.h:562
const char * name
Definition: resowner.c:115
#define ERROR
Definition: elog.h:43
ResourceArray tupdescarr
Definition: resowner.c:123
static bool ResourceArrayRemove(ResourceArray *resarr, Datum value)
Definition: resowner.c:295
#define elog
Definition: elog.h:219

◆ ResourceOwnerRememberBuffer()

void ResourceOwnerRememberBuffer ( ResourceOwner  owner,
Buffer  buffer 
)

Definition at line 841 of file resowner.c.

References ResourceOwnerData::bufferarr, BufferGetDatum, and ResourceArrayAdd().

Referenced by IncrBufferRefCount(), LocalBufferAlloc(), PinBuffer(), and PinBuffer_Locked().

842 {
843  if (owner == NULL)
844  return;
846 }
ResourceArray bufferarr
Definition: resowner.c:118
#define BufferGetDatum(buffer)
Definition: resowner.c:41
WalTimeSample buffer[LAG_TRACKER_BUFFER_SIZE]
Definition: walsender.c:214
static void ResourceArrayAdd(ResourceArray *resarr, Datum value)
Definition: resowner.c:257

◆ ResourceOwnerRememberCatCacheListRef()

void ResourceOwnerRememberCatCacheListRef ( ResourceOwner  owner,
CatCList list 
)

Definition at line 970 of file resowner.c.

References ResourceOwnerData::catlistrefarr, PointerGetDatum, and ResourceArrayAdd().

Referenced by SearchCatCacheList().

971 {
973 }
#define PointerGetDatum(X)
Definition: postgres.h:562
ResourceArray catlistrefarr
Definition: resowner.c:120
static void ResourceArrayAdd(ResourceArray *resarr, Datum value)
Definition: resowner.c:257

◆ ResourceOwnerRememberCatCacheRef()

void ResourceOwnerRememberCatCacheRef ( ResourceOwner  owner,
HeapTuple  tuple 
)

Definition at line 935 of file resowner.c.

References ResourceOwnerData::catrefarr, PointerGetDatum, and ResourceArrayAdd().

Referenced by SearchCatCacheInternal(), and SearchCatCacheMiss().

936 {
937  ResourceArrayAdd(&(owner->catrefarr), PointerGetDatum(tuple));
938 }
ResourceArray catrefarr
Definition: resowner.c:119
#define PointerGetDatum(X)
Definition: postgres.h:562
static void ResourceArrayAdd(ResourceArray *resarr, Datum value)
Definition: resowner.c:257

◆ ResourceOwnerRememberDSM()

void ResourceOwnerRememberDSM ( ResourceOwner  owner,
dsm_segment  
)

Definition at line 1231 of file resowner.c.

References ResourceOwnerData::dsmarr, PointerGetDatum, and ResourceArrayAdd().

Referenced by dsm_create_descriptor(), and dsm_unpin_mapping().

1232 {
1233  ResourceArrayAdd(&(owner->dsmarr), PointerGetDatum(seg));
1234 }
#define PointerGetDatum(X)
Definition: postgres.h:562
ResourceArray dsmarr
Definition: resowner.c:126
static void ResourceArrayAdd(ResourceArray *resarr, Datum value)
Definition: resowner.c:257

◆ ResourceOwnerRememberFile()

void ResourceOwnerRememberFile ( ResourceOwner  owner,
File  file 
)

Definition at line 1186 of file resowner.c.

References ResourceOwnerData::filearr, FileGetDatum, and ResourceArrayAdd().

Referenced by RegisterTemporaryFile().

1187 {
1188  ResourceArrayAdd(&(owner->filearr), FileGetDatum(file));
1189 }
#define FileGetDatum(file)
Definition: resowner.c:39
static void ResourceArrayAdd(ResourceArray *resarr, Datum value)
Definition: resowner.c:257
ResourceArray filearr
Definition: resowner.c:125

◆ ResourceOwnerRememberLock()

void ResourceOwnerRememberLock ( ResourceOwner  owner,
LOCALLOCK locallock 
)

Definition at line 875 of file resowner.c.

References Assert, ResourceOwnerData::locks, MAX_RESOWNER_LOCKS, and ResourceOwnerData::nlocks.

Referenced by GrantLockLocal(), and LockReassignOwner().

876 {
877  Assert(locallock != NULL);
878 
879  if (owner->nlocks > MAX_RESOWNER_LOCKS)
880  return; /* we have already overflowed */
881 
882  if (owner->nlocks < MAX_RESOWNER_LOCKS)
883  owner->locks[owner->nlocks] = locallock;
884  else
885  {
886  /* overflowed */
887  }
888  owner->nlocks++;
889 }
#define MAX_RESOWNER_LOCKS
Definition: resowner.c:105
#define Assert(condition)
Definition: c.h:680
LOCALLOCK * locks[MAX_RESOWNER_LOCKS]
Definition: resowner.c:130

◆ ResourceOwnerRememberPlanCacheRef()

void ResourceOwnerRememberPlanCacheRef ( ResourceOwner  owner,
CachedPlan plan 
)

Definition at line 1050 of file resowner.c.

References ResourceOwnerData::planrefarr, PointerGetDatum, and ResourceArrayAdd().

Referenced by GetCachedPlan().

1051 {
1052  ResourceArrayAdd(&(owner->planrefarr), PointerGetDatum(plan));
1053 }
#define PointerGetDatum(X)
Definition: postgres.h:562
ResourceArray planrefarr
Definition: resowner.c:122
static void ResourceArrayAdd(ResourceArray *resarr, Datum value)
Definition: resowner.c:257

◆ ResourceOwnerRememberRelationRef()

void ResourceOwnerRememberRelationRef ( ResourceOwner  owner,
Relation  rel 
)

Definition at line 1005 of file resowner.c.

References PointerGetDatum, ResourceOwnerData::relrefarr, and ResourceArrayAdd().

Referenced by RelationIncrementReferenceCount().

1006 {
1007  ResourceArrayAdd(&(owner->relrefarr), PointerGetDatum(rel));
1008 }
ResourceArray relrefarr
Definition: resowner.c:121
#define PointerGetDatum(X)
Definition: postgres.h:562
static void ResourceArrayAdd(ResourceArray *resarr, Datum value)
Definition: resowner.c:257

◆ ResourceOwnerRememberSnapshot()

void ResourceOwnerRememberSnapshot ( ResourceOwner  owner,
Snapshot  snapshot 
)

Definition at line 1140 of file resowner.c.

References PointerGetDatum, ResourceArrayAdd(), and ResourceOwnerData::snapshotarr.

Referenced by RegisterSnapshotOnOwner().

1141 {
1142  ResourceArrayAdd(&(owner->snapshotarr), PointerGetDatum(snapshot));
1143 }
#define PointerGetDatum(X)
Definition: postgres.h:562
ResourceArray snapshotarr
Definition: resowner.c:124
static void ResourceArrayAdd(ResourceArray *resarr, Datum value)
Definition: resowner.c:257

◆ ResourceOwnerRememberTupleDesc()

void ResourceOwnerRememberTupleDesc ( ResourceOwner  owner,
TupleDesc  tupdesc 
)

Definition at line 1094 of file resowner.c.

References PointerGetDatum, ResourceArrayAdd(), and ResourceOwnerData::tupdescarr.

Referenced by IncrTupleDescRefCount().

1095 {
1096  ResourceArrayAdd(&(owner->tupdescarr), PointerGetDatum(tupdesc));
1097 }
#define PointerGetDatum(X)
Definition: postgres.h:562
ResourceArray tupdescarr
Definition: resowner.c:123
static void ResourceArrayAdd(ResourceArray *resarr, Datum value)
Definition: resowner.c:257