*/
smgrDoPendingDeletes(true);
- /* Check we've released all catcache entries */
- AtEOXact_CatCache(true);
-
AtCommit_Notify();
AtEOXact_GUC(true, 1);
AtEOXact_SPI(true);
*/
PostPrepare_Twophase();
- /* Check we've released all catcache entries */
- AtEOXact_CatCache(true);
-
/* PREPARE acts the same as COMMIT as far as GUC is concerned */
AtEOXact_GUC(true, 1);
AtEOXact_SPI(true);
RESOURCE_RELEASE_AFTER_LOCKS,
false, true);
smgrDoPendingDeletes(false);
- AtEOXact_CatCache(false);
AtEOXact_GUC(false, 1);
AtEOXact_SPI(false);
}
-/*
- * AtEOXact_CatCache
- *
- * Clean up catcaches at end of main transaction (either commit or abort)
- *
- * As of PostgreSQL 8.1, catcache pins should get released by the
- * ResourceOwner mechanism. This routine is just a debugging
- * cross-check that no pins remain.
- */
-void
-AtEOXact_CatCache(bool isCommit)
-{
-#ifdef USE_ASSERT_CHECKING
- slist_iter cache_iter;
-
- slist_foreach(cache_iter, &CacheHdr->ch_caches)
- {
- CatCache *ccp = slist_container(CatCache, cc_next, cache_iter.cur);
- dlist_iter iter;
- int i;
-
- /* Check CatCLists */
- dlist_foreach(iter, &ccp->cc_lists)
- {
- CatCList *cl;
-
- cl = dlist_container(CatCList, cache_elem, iter.cur);
- Assert(cl->cl_magic == CL_MAGIC);
- Assert(cl->refcount == 0);
- Assert(!cl->dead);
- }
-
- /* Check individual tuples */
- for (i = 0; i < ccp->cc_nbuckets; i++)
- {
- dlist_head *bucket = &ccp->cc_bucket[i];
-
- dlist_foreach(iter, bucket)
- {
- CatCTup *ct;
-
- ct = dlist_container(CatCTup, cache_elem, iter.cur);
- Assert(ct->ct_magic == CT_MAGIC);
- Assert(ct->refcount == 0);
- Assert(!ct->dead);
- }
- }
- }
-#endif
-}
-
/*
* ResetCatalogCache
*
extern PGDLLIMPORT MemoryContext CacheMemoryContext;
extern void CreateCacheMemoryContext(void);
-extern void AtEOXact_CatCache(bool isCommit);
extern CatCache *InitCatCache(int id, Oid reloid, Oid indexoid,
int nkeys, const int *key,