From: Teodor Sigaev Date: Tue, 2 Apr 2024 11:42:05 +0000 (+0300) Subject: Replace BackendIds with 0-based ProcNumbers Marina Polyakova X-Git-Url: http://sigaev.ru/git/gitweb.cgi?a=commitdiff_plain;h=37eb65f748ca2413f8d4425e87120c027a95b48b;p=online_analyze.git Replace BackendIds with 0-based ProcNumbers Marina Polyakova --- diff --git a/online_analyze.c b/online_analyze.c index afc6b29..150a126 100644 --- a/online_analyze.c +++ b/online_analyze.c @@ -171,7 +171,12 @@ tableListAssign(const char * newval, bool doit, TableList *tbl) * 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()) { includeTables.inited = false; @@ -314,7 +319,12 @@ lateInit() TableList *tl[] = {&includeTables, &excludeTables}; int i; - if (MyBackendId == InvalidBackendId || !IsUnderPostmaster || +#if PG_VERSION_NUM >= 170000 + if (MyProcNumber == INVALID_PROC_NUMBER || +#else + if (MyBackendId == InvalidBackendId || +#endif + !IsUnderPostmaster || !IsTransactionState()) return; /* we aren't in connected state */