File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
src/backend/access/transam Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 7
7
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
8
8
* Portions Copyright (c) 1994, Regents of the University of California
9
9
*
10
- * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.432 2010/08/26 19:23:41 alvherre Exp $
10
+ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.433 2010/08/30 14:22:05 sriggs Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -7706,10 +7706,14 @@ CreateRestartPoint(int flags)
7706
7706
}
7707
7707
7708
7708
/*
7709
- * Currently, there is no need to truncate pg_subtrans during recovery. If
7710
- * we did do that, we will need to have called StartupSUBTRANS() already
7711
- * and then TruncateSUBTRANS() would go here.
7709
+ * Truncate pg_subtrans if possible. We can throw away all data before
7710
+ * the oldest XMIN of any running transaction. No future transaction will
7711
+ * attempt to reference any pg_subtrans entry older than that (see Asserts
7712
+ * in subtrans.c). When hot standby is disabled, though, we mustn't do
7713
+ * this because StartupSUBTRANS hasn't been called yet.
7712
7714
*/
7715
+ if (EnableHotStandby )
7716
+ TruncateSUBTRANS (GetOldestXmin (true, false));
7713
7717
7714
7718
/* All real work is done, but log before releasing lock. */
7715
7719
if (log_checkpoints )
You can’t perform that action at this time.
0 commit comments