*** pgsql/src/backend/commands/tablecmds.c 2010/01/22 16:40:18 1.318 --- pgsql/src/backend/commands/tablecmds.c 2010/01/28 07:31:42 1.319 *************** *** 8,14 **** * * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.317 2010/01/20 19:43:40 heikki Exp $ * *------------------------------------------------------------------------- */ --- 8,14 ---- * * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.318 2010/01/22 16:40:18 rhaas Exp $ * *------------------------------------------------------------------------- */ *************** ATRewriteTable(AlteredTableInfo *tab, Oi *** 2998,3004 **** * 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. */ if (newrel) { --- 2998,3005 ---- * 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 or streaming replication). The FSM is empty too, ! * so don't bother using it. */ if (newrel) { *************** ATRewriteTable(AlteredTableInfo *tab, Oi *** 3006,3012 **** bistate = GetBulkInsertState(); hi_options = HEAP_INSERT_SKIP_FSM; ! if (!XLogArchivingActive()) hi_options |= HEAP_INSERT_SKIP_WAL; } else --- 3007,3013 ---- bistate = GetBulkInsertState(); hi_options = HEAP_INSERT_SKIP_FSM; ! if (!XLogIsNeeded()) hi_options |= HEAP_INSERT_SKIP_WAL; } else