File tree 3 files changed +10
-7
lines changed
3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 8
8
*
9
9
*
10
10
* 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 $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
@@ -2998,15 +2998,16 @@ ATRewriteTable(AlteredTableInfo *tab, Oid OIDNewHeap)
2998
2998
* Prepare a BulkInsertState and options for heap_insert. Because
2999
2999
* we're building a new heap, we can skip WAL-logging and fsync it
3000
3000
* 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.
3002
3003
*/
3003
3004
if (newrel )
3004
3005
{
3005
3006
mycid = GetCurrentCommandId (true);
3006
3007
bistate = GetBulkInsertState ();
3007
3008
3008
3009
hi_options = HEAP_INSERT_SKIP_FSM ;
3009
- if (!XLogArchivingActive ())
3010
+ if (!XLogIsNeeded ())
3010
3011
hi_options |= HEAP_INSERT_SKIP_WAL ;
3011
3012
}
3012
3013
else
Original file line number Diff line number Diff line change 29
29
*
30
30
*
31
31
* 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 $
33
33
*
34
34
*-------------------------------------------------------------------------
35
35
*/
@@ -288,7 +288,7 @@ vacuum_log_cleanup_info(Relation rel, LVRelStats *vacrelstats)
288
288
* No need to log changes for temp tables, they do not contain
289
289
* data visible on the standby server.
290
290
*/
291
- if (rel -> rd_istemp || !XLogArchivingActive ())
291
+ if (rel -> rd_istemp || !XLogIsNeeded ())
292
292
return ;
293
293
294
294
(void ) log_heap_cleanup_info (rel -> rd_node , vacrelstats -> latestRemovedXid );
Original file line number Diff line number Diff line change 6
6
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
7
7
* Portions Copyright (c) 1994, Regents of the University of California
8
8
*
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 $
10
10
*/
11
11
#ifndef XLOG_H
12
12
#define XLOG_H
@@ -186,7 +186,6 @@ extern int MaxStandbyDelay;
186
186
187
187
#define XLogArchivingActive () (XLogArchiveMode)
188
188
#define XLogArchiveCommandSet () (XLogArchiveCommand[0] != '\0')
189
- #define XLogStandbyInfoActive () (XLogRequestRecoveryConnections && XLogArchiveMode)
190
189
191
190
/*
192
191
* This is in walsender.c, but declared here so that we don't need to include
@@ -200,6 +199,9 @@ extern int MaxWalSenders;
200
199
*/
201
200
#define XLogIsNeeded () (XLogArchivingActive() || (MaxWalSenders > 0))
202
201
202
+ /* Do we need to WAL-log information required only for Hot Standby? */
203
+ #define XLogStandbyInfoActive () (XLogRequestRecoveryConnections && XLogIsNeeded())
204
+
203
205
#ifdef WAL_DEBUG
204
206
extern bool XLOG_DEBUG ;
205
207
#endif
You can’t perform that action at this time.
0 commit comments