mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Invent ResourceOwner mechanism as per my recent proposal, and use it to
keep track of portal-related resources separately from transaction-related resources. This allows cursors to work in a somewhat sane fashion with nested transactions. For now, cursor behavior is non-subtransactional, that is a cursor's state does not roll back if you abort a subtransaction that fetched from the cursor. We might want to change that later.
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/utils/catcache.h,v 1.49 2004/07/01 00:51:44 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/utils/catcache.h,v 1.50 2004/07/17 03:31:47 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -101,9 +101,6 @@ typedef struct catctup
|
||||
* and negative entries is identical.
|
||||
*/
|
||||
int refcount; /* number of active references */
|
||||
int *prev_refcount; /* refcounts for upper subtransactions */
|
||||
int numpushes; /* number of used refcounts in the array */
|
||||
int numalloc; /* allocated size of array */
|
||||
bool dead; /* dead but not yet removed? */
|
||||
bool negative; /* negative cache entry? */
|
||||
uint32 hash_value; /* hash value for this tuple's keys */
|
||||
@@ -142,9 +139,6 @@ typedef struct catclist
|
||||
*/
|
||||
Dlelem cache_elem; /* list member of per-catcache list */
|
||||
int refcount; /* number of active references */
|
||||
int *prev_refcount; /* refcounts for upper subtransactions */
|
||||
int numpushes; /* number of used refcounts in the array */
|
||||
int numalloc; /* allocated size of array */
|
||||
bool dead; /* dead but not yet removed? */
|
||||
bool ordered; /* members listed in index order? */
|
||||
short nkeys; /* number of lookup keys specified */
|
||||
@@ -169,8 +163,6 @@ extern DLLIMPORT MemoryContext CacheMemoryContext;
|
||||
|
||||
extern void CreateCacheMemoryContext(void);
|
||||
extern void AtEOXact_CatCache(bool isCommit);
|
||||
extern void AtSubStart_CatCache(void);
|
||||
extern void AtEOSubXact_CatCache(bool isCommit);
|
||||
|
||||
extern CatCache *InitCatCache(int id, const char *relname, const char *indname,
|
||||
int reloidattr,
|
||||
|
||||
Reference in New Issue
Block a user