Replace BackendIds with 0-based ProcNumbers Marina Polyakova <m.polyakova@postgrespro.ru>
[plantuner.git] / plantuner.c
index 0c07b7f..e454698 100644 (file)
@@ -102,7 +102,12 @@ indexesAssign(const char * newval, bool doit, GucSource source,
         * follow work could be done only in normal processing because of
         * accsess to system catalog
         */
-       if (MyBackendId == InvalidBackendId || !IsUnderPostmaster ||
+#if PG_VERSION_NUM >= 170000
+       if (MyProcNumber == INVALID_PROC_NUMBER ||
+#else
+       if (MyBackendId == InvalidBackendId ||
+#endif
+               !IsUnderPostmaster ||
                !IsTransactionState())
        {
                /* reset init state */