projects
/
online_analyze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ec519c4
)
Replace BackendIds with 0-based ProcNumbers Marina Polyakova <m.polyakova@postgrespro.ru>
author
Teodor Sigaev
<teodor@sigaev.ru>
Tue, 2 Apr 2024 11:42:05 +0000
(14:42 +0300)
committer
Teodor Sigaev
<teodor@sigaev.ru>
Tue, 2 Apr 2024 11:42:05 +0000
(14:42 +0300)
online_analyze.c
patch
|
blob
|
history
diff --git
a/online_analyze.c
b/online_analyze.c
index
afc6b29
..
150a126
100644
(file)
--- 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
*/
* 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;
!IsTransactionState())
{
includeTables.inited = false;
@@
-314,7
+319,12
@@
lateInit()
TableList *tl[] = {&includeTables, &excludeTables};
int i;
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 */
!IsTransactionState())
return; /* we aren't in connected state */