Header And Logo

PostgreSQL
| The world's most advanced open source database.

resowner_private.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * resowner_private.h
00004  *    POSTGRES resource owner private definitions.
00005  *
00006  * See utils/resowner/README for more info.
00007  *
00008  *
00009  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00010  * Portions Copyright (c) 1994, Regents of the University of California
00011  *
00012  * src/include/utils/resowner_private.h
00013  *
00014  *-------------------------------------------------------------------------
00015  */
00016 #ifndef RESOWNER_PRIVATE_H
00017 #define RESOWNER_PRIVATE_H
00018 
00019 #include "storage/fd.h"
00020 #include "storage/lock.h"
00021 #include "utils/catcache.h"
00022 #include "utils/plancache.h"
00023 #include "utils/resowner.h"
00024 #include "utils/snapshot.h"
00025 
00026 
00027 /* support for buffer refcount management */
00028 extern void ResourceOwnerEnlargeBuffers(ResourceOwner owner);
00029 extern void ResourceOwnerRememberBuffer(ResourceOwner owner, Buffer buffer);
00030 extern void ResourceOwnerForgetBuffer(ResourceOwner owner, Buffer buffer);
00031 
00032 /* support for local lock management */
00033 extern void ResourceOwnerRememberLock(ResourceOwner owner, LOCALLOCK *locallock);
00034 extern void ResourceOwnerForgetLock(ResourceOwner owner, LOCALLOCK *locallock);
00035 
00036 /* support for catcache refcount management */
00037 extern void ResourceOwnerEnlargeCatCacheRefs(ResourceOwner owner);
00038 extern void ResourceOwnerRememberCatCacheRef(ResourceOwner owner,
00039                                  HeapTuple tuple);
00040 extern void ResourceOwnerForgetCatCacheRef(ResourceOwner owner,
00041                                HeapTuple tuple);
00042 extern void ResourceOwnerEnlargeCatCacheListRefs(ResourceOwner owner);
00043 extern void ResourceOwnerRememberCatCacheListRef(ResourceOwner owner,
00044                                      CatCList *list);
00045 extern void ResourceOwnerForgetCatCacheListRef(ResourceOwner owner,
00046                                    CatCList *list);
00047 
00048 /* support for relcache refcount management */
00049 extern void ResourceOwnerEnlargeRelationRefs(ResourceOwner owner);
00050 extern void ResourceOwnerRememberRelationRef(ResourceOwner owner,
00051                                  Relation rel);
00052 extern void ResourceOwnerForgetRelationRef(ResourceOwner owner,
00053                                Relation rel);
00054 
00055 /* support for plancache refcount management */
00056 extern void ResourceOwnerEnlargePlanCacheRefs(ResourceOwner owner);
00057 extern void ResourceOwnerRememberPlanCacheRef(ResourceOwner owner,
00058                                   CachedPlan *plan);
00059 extern void ResourceOwnerForgetPlanCacheRef(ResourceOwner owner,
00060                                 CachedPlan *plan);
00061 
00062 /* support for tupledesc refcount management */
00063 extern void ResourceOwnerEnlargeTupleDescs(ResourceOwner owner);
00064 extern void ResourceOwnerRememberTupleDesc(ResourceOwner owner,
00065                                TupleDesc tupdesc);
00066 extern void ResourceOwnerForgetTupleDesc(ResourceOwner owner,
00067                              TupleDesc tupdesc);
00068 
00069 /* support for snapshot refcount management */
00070 extern void ResourceOwnerEnlargeSnapshots(ResourceOwner owner);
00071 extern void ResourceOwnerRememberSnapshot(ResourceOwner owner,
00072                               Snapshot snapshot);
00073 extern void ResourceOwnerForgetSnapshot(ResourceOwner owner,
00074                             Snapshot snapshot);
00075 
00076 /* support for temporary file management */
00077 extern void ResourceOwnerEnlargeFiles(ResourceOwner owner);
00078 extern void ResourceOwnerRememberFile(ResourceOwner owner,
00079                           File file);
00080 extern void ResourceOwnerForgetFile(ResourceOwner owner,
00081                         File file);
00082 
00083 #endif   /* RESOWNER_PRIVATE_H */