* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.402 2010/04/23 19:57:18 sriggs Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.403 2010/04/23 20:21:31 sriggs Exp $
*
*-------------------------------------------------------------------------
*/
RecoveryRequiresIntParameter("max_locks_per_xact",
max_locks_per_xact, checkPoint.max_locks_per_xact);
- /*
- * Hot Standby currently only depends upon the presence of WAL
- * records as indicated by XLOG_MODE_HOT_STANDBY. There is no current
- * dependency on whether archiving or streaming are enabled, if either.
- */
- if (!(checkPoint.XLogModeFlags & XLOG_MODE_HOT_STANDBY))
+ if (!checkPoint.XLogStandbyInfoMode)
ereport(ERROR,
(errmsg("recovery connections cannot start because the recovery_connections "
"parameter is disabled on the WAL source server")));
checkPoint.MaxConnections = MaxConnections;
checkPoint.max_prepared_xacts = max_prepared_xacts;
checkPoint.max_locks_per_xact = max_locks_per_xact;
-
- if (XLogArchivingActive())
- checkPoint.XLogModeFlags |= XLOG_MODE_ARCHIVING;
- if (max_wal_senders > 0)
- checkPoint.XLogModeFlags |= XLOG_MODE_STREAMING;
- if (XLogRequestRecoveryConnections)
- checkPoint.XLogModeFlags |= XLOG_MODE_HOT_STANDBY;
+ checkPoint.XLogStandbyInfoMode = XLogStandbyInfoActive();
/*
* We must hold WALInsertLock while examining insert state to determine
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/pg_control.h,v 1.52 2010/04/23 19:57:19 sriggs Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_control.h,v 1.53 2010/04/23 20:21:31 sriggs Exp $
*
*-------------------------------------------------------------------------
*/
int MaxConnections;
int max_prepared_xacts;
int max_locks_per_xact;
- int XLogModeFlags;
+ bool XLogStandbyInfoMode;
/*
* Oldest XID still running. This is only needed to initialize hot standby
#define XLOG_BACKUP_END 0x50
#define XLOG_UNLOGGED 0x60
-/* XLogModeFlags */
-#define XLOG_MODE_ARCHIVING (1 << 0)
-#define XLOG_MODE_STREAMING (1 << 1)
-#define XLOG_MODE_HOT_STANDBY (1 << 2)
/* System status indicator */
typedef enum DBState