File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 23
23
*
24
24
*
25
25
* IDENTIFICATION
26
- * $PostgreSQL: pgsql/src/backend/storage/ipc/procarray.c,v 1.44 2008/05/12 20: 02:00 alvherre Exp $
26
+ * $PostgreSQL: pgsql/src/backend/storage/ipc/procarray.c,v 1.45 2008/07/11 02:10:13 alvherre Exp $
27
27
*
28
28
*-------------------------------------------------------------------------
29
29
*/
@@ -666,6 +666,9 @@ GetOldestXmin(bool allDbs, bool ignoreVacuum)
666
666
* RecentGlobalXmin: the global xmin (oldest TransactionXmin across all
667
667
* running transactions, except those running LAZY VACUUM). This is
668
668
* the same computation done by GetOldestXmin(true, true).
669
+ *
670
+ * Note: this function should probably not be called with an argument that's
671
+ * not statically allocated (see xip allocation below).
669
672
*/
670
673
Snapshot
671
674
GetSnapshotData (Snapshot snapshot )
Original file line number Diff line number Diff line change 3
3
* PostgreSQL snapshot manager
4
4
*
5
5
* We keep track of snapshots in two ways: the "registered snapshots" list,
6
- * and the "active snapshot" stack. All snapshots in any of them is supposed
7
- * to be in persistent memory. When a snapshot is no longer in any of these
8
- * lists (tracked by separate refcounts of each snapshot), its memory can be
9
- * freed.
6
+ * and the "active snapshot" stack. All snapshots in either of them live in
7
+ * persistent memory. When a snapshot is no longer in any of these lists
8
+ * (tracked by separate refcounts on each snapshot), its memory can be freed.
10
9
*
11
10
* These arrangements let us reset MyProc->xmin when there are no snapshots
12
11
* referenced by this transaction. (One possible improvement would be to be
23
22
* Portions Copyright (c) 1994, Regents of the University of California
24
23
*
25
24
* IDENTIFICATION
26
- * $PostgreSQL: pgsql/src/backend/utils/time/snapmgr.c,v 1.3 2008/07/11 00:00:29 neilc Exp $
25
+ * $PostgreSQL: pgsql/src/backend/utils/time/snapmgr.c,v 1.4 2008/07/11 02:10:14 alvherre Exp $
27
26
*
28
27
*-------------------------------------------------------------------------
29
28
*/
@@ -261,6 +260,7 @@ FreeSnapshot(Snapshot snapshot)
261
260
{
262
261
Assert (snapshot -> regd_count == 0 );
263
262
Assert (snapshot -> active_count == 0 );
263
+ Assert (snapshot -> copied );
264
264
265
265
pfree (snapshot );
266
266
}
You can’t perform that action at this time.
0 commit comments