fix empty table now suggest 1 page instead of 0 for empty table - zero causes unwilli...
[plantuner.git] / plantuner.c
index 9f0c771..8595463 100644 (file)
@@ -83,7 +83,7 @@ indexesAssign(const char * newval, bool doit, GucSource source, bool isDisable)
         * accsess to system catalog
         */
        if (MyBackendId == InvalidBackendId || !IsUnderPostmaster ||
-               MyAuxProcType != NotAnAuxProcess ||     !IsTransactionState())
+               !IsTransactionState())
        {
                /* reset init state */
                if (isDisable)
@@ -291,7 +291,7 @@ execPlantuner(PlannerInfo *root, Oid relationObjectId, bool inhparent,
                         * estimate_rel_size() could be too pessimistic for particular
                         * workload
                         */
-                       rel->pages = 0.0;
+                       rel->pages = 1.0;
                        rel->tuples = 0.0;
                }