From ea00685d19e1f0b29a62c25d841db1f7d8bcbb58 Mon Sep 17 00:00:00 2001 From: Paul Norman Date: Sat, 4 Jul 2015 14:16:56 -0700 Subject: [PATCH] Disable autovacuum on the rendering tables during import Although the tables are only growing and will not trigger autovacuum, they may still trigger autoanalyze which is controlled by the same storage setting. --- table.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/table.cpp b/table.cpp index 8c7a88248..7300f02f4 100644 --- a/table.cpp +++ b/table.cpp @@ -146,6 +146,10 @@ void table_t::start() else sql[sql.length() - 1] = ')'; + // The final tables are created with CREATE TABLE AS ... SELECT * FROM ... + // This means that they won't get this autovacuum setting, so it doesn't + // doesn't need to be RESET on these tables + sql += " WITH ( autovacuum_enabled = FALSE )"; //add the main table space if (table_space) sql += " TABLESPACE " + table_space.get();