diff options
| author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2008-12-04 14:51:02 +0000 |
|---|---|---|
| committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2008-12-04 14:51:02 +0000 |
| commit | 7b640b0345dc4fbd39ff568700985b432f6afa07 (patch) | |
| tree | bf19fbefd12623fd923cc9fcfc51e41767ad50b2 /src/include/utils/snapmgr.h | |
| parent | 30c52532d2fe9dfc915ae1292f03adf7d033816b (diff) | |
| download | postgresql-7b640b0345dc4fbd39ff568700985b432f6afa07.tar.gz | |
Fix a couple of snapshot management bugs in the new ResourceOwner world:
non-writable large objects need to have their snapshots registered on the
transaction resowner, not the current portal's, because it must persist until
the large object is closed (which the portal does not). Also, ensure that the
serializable snapshot is recorded by the transaction resource owner too, even
when a subtransaction has changed the current resource owner before
serializable is taken.
Per bug reports from Pavan Deolasee.
Diffstat (limited to 'src/include/utils/snapmgr.h')
| -rw-r--r-- | src/include/utils/snapmgr.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/include/utils/snapmgr.h b/src/include/utils/snapmgr.h index 8f3cc44c57..f4e55c9930 100644 --- a/src/include/utils/snapmgr.h +++ b/src/include/utils/snapmgr.h @@ -6,13 +6,14 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/snapmgr.h,v 1.2 2008/05/12 20:02:02 alvherre Exp $ + * $PostgreSQL: pgsql/src/include/utils/snapmgr.h,v 1.3 2008/12/04 14:51:02 alvherre Exp $ * *------------------------------------------------------------------------- */ #ifndef SNAPMGR_H #define SNAPMGR_H +#include "utils/resowner.h" #include "utils/snapshot.h" @@ -34,9 +35,12 @@ extern bool ActiveSnapshotSet(void); extern Snapshot RegisterSnapshot(Snapshot snapshot); extern void UnregisterSnapshot(Snapshot snapshot); +extern Snapshot RegisterSnapshotOnOwner(Snapshot snapshot, ResourceOwner owner); +extern void UnregisterSnapshotFromOwner(Snapshot snapshot, ResourceOwner owner); extern void AtSubCommit_Snapshot(int level); extern void AtSubAbort_Snapshot(int level); +extern void AtEarlyCommit_Snapshot(void); extern void AtEOXact_Snapshot(bool isCommit); #endif /* SNAPMGR_H */ |
