Replace BackendIds with 0-based ProcNumbers Marina Polyakova <m.polyakova@postgrespro.ru> master
authorTeodor Sigaev <teodor@sigaev.ru>
Tue, 2 Apr 2024 11:43:02 +0000 (14:43 +0300)
committerTeodor Sigaev <teodor@sigaev.ru>
Tue, 2 Apr 2024 11:43:02 +0000 (14:43 +0300)
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 */