From: Teodor Sigaev Date: Tue, 2 Apr 2024 11:43:02 +0000 (+0300) Subject: Replace BackendIds with 0-based ProcNumbers Marina Polyakova X-Git-Url: http://sigaev.ru/git/gitweb.cgi?a=commitdiff_plain;h=0c1bf0a90a4ae17db6b0232aa9258a2ce28604f3;p=plantuner.git Replace BackendIds with 0-based ProcNumbers Marina Polyakova --- diff --git a/plantuner.c b/plantuner.c index 0c07b7f..e454698 100644 --- a/plantuner.c +++ b/plantuner.c @@ -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 */