*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.318 2010/01/22 16:40:18 rhaas Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.319 2010/01/28 07:31:42 heikki Exp $
*
*-------------------------------------------------------------------------
*/
* Prepare a BulkInsertState and options for heap_insert. Because
* we're building a new heap, we can skip WAL-logging and fsync it
* to disk at the end instead (unless WAL-logging is required for
- * archiving). The FSM is empty too, so don't bother using it.
+ * archiving or streaming replication). The FSM is empty too,
+ * so don't bother using it.
*/
if (newrel)
{
bistate = GetBulkInsertState();
hi_options = HEAP_INSERT_SKIP_FSM;
- if (!XLogArchivingActive())
+ if (!XLogIsNeeded())
hi_options |= HEAP_INSERT_SKIP_WAL;
}
else
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/vacuumlazy.c,v 1.127 2010/01/02 16:57:40 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/vacuumlazy.c,v 1.128 2010/01/28 07:31:42 heikki Exp $
*
*-------------------------------------------------------------------------
*/
* No need to log changes for temp tables, they do not contain
* data visible on the standby server.
*/
- if (rel->rd_istemp || !XLogArchivingActive())
+ if (rel->rd_istemp || !XLogIsNeeded())
return;
(void) log_heap_cleanup_info(rel->rd_node, vacrelstats->latestRemovedXid);
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/xlog.h,v 1.98 2010/01/20 19:43:40 heikki Exp $
+ * $PostgreSQL: pgsql/src/include/access/xlog.h,v 1.99 2010/01/28 07:31:42 heikki Exp $
*/
#ifndef XLOG_H
#define XLOG_H
#define XLogArchivingActive() (XLogArchiveMode)
#define XLogArchiveCommandSet() (XLogArchiveCommand[0] != '\0')
-#define XLogStandbyInfoActive() (XLogRequestRecoveryConnections && XLogArchiveMode)
/*
* This is in walsender.c, but declared here so that we don't need to include
*/
#define XLogIsNeeded() (XLogArchivingActive() || (MaxWalSenders > 0))
+/* Do we need to WAL-log information required only for Hot Standby? */
+#define XLogStandbyInfoActive() (XLogRequestRecoveryConnections && XLogIsNeeded())
+
#ifdef WAL_DEBUG
extern bool XLOG_DEBUG;
#endif