File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 88 *
99 *
1010 * IDENTIFICATION
11- * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.318 2010/01/22 16:40:18 rhaas Exp $
11+ * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.319 2010/01/28 07:31:42 heikki Exp $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -2998,15 +2998,16 @@ ATRewriteTable(AlteredTableInfo *tab, Oid OIDNewHeap)
29982998 * Prepare a BulkInsertState and options for heap_insert. Because
29992999 * we're building a new heap, we can skip WAL-logging and fsync it
30003000 * to disk at the end instead (unless WAL-logging is required for
3001- * archiving). The FSM is empty too, so don't bother using it.
3001+ * archiving or streaming replication). The FSM is empty too,
3002+ * so don't bother using it.
30023003 */
30033004 if (newrel )
30043005 {
30053006 mycid = GetCurrentCommandId (true);
30063007 bistate = GetBulkInsertState ();
30073008
30083009 hi_options = HEAP_INSERT_SKIP_FSM ;
3009- if (!XLogArchivingActive ())
3010+ if (!XLogIsNeeded ())
30103011 hi_options |= HEAP_INSERT_SKIP_WAL ;
30113012 }
30123013 else
Original file line number Diff line number Diff line change 2929 *
3030 *
3131 * IDENTIFICATION
32- * $PostgreSQL: pgsql/src/backend/commands/vacuumlazy.c,v 1.127 2010/01/02 16:57:40 momjian Exp $
32+ * $PostgreSQL: pgsql/src/backend/commands/vacuumlazy.c,v 1.128 2010/01/28 07:31:42 heikki Exp $
3333 *
3434 *-------------------------------------------------------------------------
3535 */
@@ -288,7 +288,7 @@ vacuum_log_cleanup_info(Relation rel, LVRelStats *vacrelstats)
288288 * No need to log changes for temp tables, they do not contain
289289 * data visible on the standby server.
290290 */
291- if (rel -> rd_istemp || !XLogArchivingActive ())
291+ if (rel -> rd_istemp || !XLogIsNeeded ())
292292 return ;
293293
294294 (void ) log_heap_cleanup_info (rel -> rd_node , vacrelstats -> latestRemovedXid );
Original file line number Diff line number Diff line change 66 * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
77 * Portions Copyright (c) 1994, Regents of the University of California
88 *
9- * $PostgreSQL: pgsql/src/include/access/xlog.h,v 1.98 2010/01/20 19:43:40 heikki Exp $
9+ * $PostgreSQL: pgsql/src/include/access/xlog.h,v 1.99 2010/01/28 07:31:42 heikki Exp $
1010 */
1111#ifndef XLOG_H
1212#define XLOG_H
@@ -186,7 +186,6 @@ extern int MaxStandbyDelay;
186186
187187#define XLogArchivingActive () (XLogArchiveMode)
188188#define XLogArchiveCommandSet () (XLogArchiveCommand[0] != '\0')
189- #define XLogStandbyInfoActive () (XLogRequestRecoveryConnections && XLogArchiveMode)
190189
191190/*
192191 * This is in walsender.c, but declared here so that we don't need to include
@@ -200,6 +199,9 @@ extern int MaxWalSenders;
200199 */
201200#define XLogIsNeeded () (XLogArchivingActive() || (MaxWalSenders > 0))
202201
202+ /* Do we need to WAL-log information required only for Hot Standby? */
203+ #define XLogStandbyInfoActive () (XLogRequestRecoveryConnections && XLogIsNeeded())
204+
203205#ifdef WAL_DEBUG
204206extern bool XLOG_DEBUG ;
205207#endif
You can’t perform that action at this time.
0 commit comments