* 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;
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 */