X-Git-Url: http://sigaev.ru/git/gitweb.cgi?p=plantuner.git;a=blobdiff_plain;f=plantuner.c;h=f87dcea21ffe4202225b5a9a3241d28880e661d1;hp=0c07b7f9246f06e228a3699bb41861c4b5a3d3cf;hb=HEAD;hpb=0652f9e858cacb087201f7ab658101bcba7a31a9 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 */