On Tue, Apr 27, 2010 at 5:09 PM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> Ok, here's a patch that includes the changes to add new wal_mode GUC
> (http://archives.postgresql.org/message-id/4BD581A6.60602@enterprisedb.com),
> and implements Tom's design to keep a copy of wal_mode and the
> max_connections, max_prepared_xacts and max_locks_per_xact settings in
> pg_control.
I have some comments:
config.sgml
> <literal>on</literal>. It is thought that there is little
> measurable difference in performance from using this feature, so
> feedback is welcome if any production impacts are noticeable.
> It is likely that this parameter will be removed in later releases.
Is this description still required for recovery_connections?
> if (!XLogArchivingActive())
> ereport(ERROR,
> (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
> errmsg("WAL archiving is not active"),
> errhint("archive_mode must be enabled at server start.")));
You need to change the error messages which refer to archive_mode,
like the above.
+ /*
+ * For Hot Standby, the WAL must be generated with 'hot_standby' mode,
+ * and we must have at least as many backend slots as the primary.
+ */
+ if (InArchiveRecovery && XLogRequestRecoveryConnections)
+ {
+ if (ControlFile->wal_mode < WAL_MODE_HOT_STANDBY)
+ ereport(ERROR,
+ (errmsg("recovery connections cannot start because
wal_mode was not set to 'hot_standby' on the WAL source server")));
This seems to always prevent the server from doing an archive recovery
since wal_mode is expected to be WAL_MODE_ARCHIVE in that case.
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center