|
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.402 2010/04/2319:57:18 sriggs Exp $ |
| 10 | + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.403 2010/04/2320:21:31 sriggs Exp $ |
11 | 11 | * |
12 | 12 | *------------------------------------------------------------------------- |
13 | 13 | */ |
@@ -5568,12 +5568,7 @@ CheckRequiredParameterValues(CheckPoint checkPoint) |
5568 | 5568 | RecoveryRequiresIntParameter("max_locks_per_xact", |
5569 | 5569 | max_locks_per_xact,checkPoint.max_locks_per_xact); |
5570 | 5570 |
|
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)) |
| 5571 | +if (!checkPoint.XLogStandbyInfoMode) |
5577 | 5572 | ereport(ERROR, |
5578 | 5573 | (errmsg("recovery connections cannot start because the recovery_connections " |
5579 | 5574 | "parameter is disabled on the WAL source server"))); |
@@ -7007,13 +7002,7 @@ CreateCheckPoint(int flags) |
7007 | 7002 | checkPoint.MaxConnections=MaxConnections; |
7008 | 7003 | checkPoint.max_prepared_xacts=max_prepared_xacts; |
7009 | 7004 | checkPoint.max_locks_per_xact=max_locks_per_xact; |
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; |
| 7005 | +checkPoint.XLogStandbyInfoMode=XLogStandbyInfoActive(); |
7017 | 7006 |
|
7018 | 7007 | /* |
7019 | 7008 | * We must hold WALInsertLock while examining insert state to determine |
|