summaryrefslogtreecommitdiff
path: root/src/include/utils/resowner.h
diff options
context:
space:
mode:
authorAlvaro Herrera2008-11-25 20:28:29 +0000
committerAlvaro Herrera2008-11-25 20:28:29 +0000
commit6bbef4e5383c99d93aa974e2c79d328cfbd1c4a9 (patch)
tree6f2dcb1f3a1e92b1c503a22c17d1267a6dea42c1 /src/include/utils/resowner.h
parent1304f297a44516857cf404742487da0ed6344fdb (diff)
Use ResourceOwners in the snapshot manager, instead of attempting to track them
by hand. As an added bonus, the new code is smaller and more understandable, and the ugly loops are gone. This had been discussed all along but never implemented. It became clear that it really needed to be fixed after a bug report by Pavan Deolasee.
Diffstat (limited to 'src/include/utils/resowner.h')
-rw-r--r--src/include/utils/resowner.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/include/utils/resowner.h b/src/include/utils/resowner.h
index 1369aa7f683..9d738cb8e1e 100644
--- a/src/include/utils/resowner.h
+++ b/src/include/utils/resowner.h
@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/resowner.h,v 1.15 2008/01/01 19:45:59 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/utils/resowner.h,v 1.16 2008/11/25 20:28:29 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,6 +22,7 @@
#include "storage/buf.h"
#include "utils/catcache.h"
#include "utils/plancache.h"
+#include "utils/snapshot.h"
/*
@@ -121,4 +122,11 @@ extern void ResourceOwnerRememberTupleDesc(ResourceOwner owner,
extern void ResourceOwnerForgetTupleDesc(ResourceOwner owner,
TupleDesc tupdesc);
+/* support for snapshot refcount management */
+extern void ResourceOwnerEnlargeSnapshots(ResourceOwner owner);
+extern void ResourceOwnerRememberSnapshot(ResourceOwner owner,
+ Snapshot snapshot);
+extern void ResourceOwnerForgetSnapshot(ResourceOwner owner,
+ Snapshot snapshot);
+
#endif /* RESOWNER_H */