From 0c1bf0a90a4ae17db6b0232aa9258a2ce28604f3 Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Tue, 2 Apr 2024 14:43:02 +0300 Subject: [PATCH] Replace BackendIds with 0-based ProcNumbers Marina Polyakova --- plantuner.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 */ -- 2.46.1