|
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.401 2010/04/20 11:15:06 rhaas Exp $ |
| 10 | + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.402 2010/04/23 19:57:18 sriggs Exp $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
@@ -5568,7 +5568,12 @@ CheckRequiredParameterValues(CheckPoint checkPoint)
|
5568 | 5568 | RecoveryRequiresIntParameter("max_locks_per_xact",
|
5569 | 5569 | max_locks_per_xact, checkPoint.max_locks_per_xact);
|
5570 | 5570 |
|
5571 |
| - if (!checkPoint.XLogStandbyInfoMode) |
| 5571 | + /* |
| 5572 | + * Hot Standby currently only depends upon the presence of WAL |
| 5573 | + * records as indicated by XLOG_MODE_HOT_STANDBY. There is no current |
| 5574 | + * dependency on whether archiving or streaming are enabled, if either. |
| 5575 | + */ |
| 5576 | + if (!(checkPoint.XLogModeFlags & XLOG_MODE_HOT_STANDBY)) |
5572 | 5577 | ereport(ERROR,
|
5573 | 5578 | (errmsg("recovery connections cannot start because the recovery_connections "
|
5574 | 5579 | "parameter is disabled on the WAL source server")));
|
@@ -7002,7 +7007,13 @@ CreateCheckPoint(int flags)
|
7002 | 7007 | checkPoint.MaxConnections = MaxConnections;
|
7003 | 7008 | checkPoint.max_prepared_xacts = max_prepared_xacts;
|
7004 | 7009 | checkPoint.max_locks_per_xact = max_locks_per_xact;
|
7005 |
| - checkPoint.XLogStandbyInfoMode = XLogStandbyInfoActive(); |
| 7010 | + |
| 7011 | + if (XLogArchivingActive()) |
| 7012 | + checkPoint.XLogModeFlags |= XLOG_MODE_ARCHIVING; |
| 7013 | + if (max_wal_senders > 0) |
| 7014 | + checkPoint.XLogModeFlags |= XLOG_MODE_STREAMING; |
| 7015 | + if (XLogRequestRecoveryConnections) |
| 7016 | + checkPoint.XLogModeFlags |= XLOG_MODE_HOT_STANDBY; |
7006 | 7017 |
|
7007 | 7018 | /*
|
7008 | 7019 | * We must hold WALInsertLock while examining insert state to determine
|
|
0 commit comments