|
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/1100:00:29 neilc Exp $ |
| 25 | + * $PostgreSQL: pgsql/src/backend/utils/time/snapmgr.c,v 1.4 2008/07/1102: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 | }
|
|