mirror of https://github.com/citusdata/citus.git
Introduces proc_statusflags_compat macro
In two commits vacuumFlags in PGXACT is moved and then renamed to status flags This macro uses the appropriate version of the flag Relevant PG commits: 5788e258bb26495fab65ff3aa486268d1c50b123 cd9c1b3e197a9b53b840dcc87eb41b04d601a5f9pull/5209/head
parent
287706b717
commit
898d3bb8d3
|
@ -461,9 +461,7 @@ IsProcessWaitingForSafeOperations(PGPROC *proc)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get the transaction that the backend associated with */
|
if (pgproc_statusflags_compat(proc) & PROC_IS_AUTOVACUUM)
|
||||||
PGXACT *pgxact = &ProcGlobal->allPgXact[proc->pgprocno];
|
|
||||||
if (pgxact->vacuumFlags & PROC_IS_AUTOVACUUM)
|
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
#define COPY_FRONTEND_COMPAT COPY_FRONTEND
|
#define COPY_FRONTEND_COMPAT COPY_FRONTEND
|
||||||
#define SetTuplestoreDestReceiverParams_compat(a, b, c, d, e, f) \
|
#define SetTuplestoreDestReceiverParams_compat(a, b, c, d, e, f) \
|
||||||
SetTuplestoreDestReceiverParams(a, b, c, d, e, f)
|
SetTuplestoreDestReceiverParams(a, b, c, d, e, f)
|
||||||
|
#define pgproc_statusflags_compat(pgproc) ((pgproc)->statusFlags)
|
||||||
#else
|
#else
|
||||||
#define AlterTableStmtObjType(a) ((a)->relkind)
|
#define AlterTableStmtObjType(a) ((a)->relkind)
|
||||||
#define F_NEXTVAL_COMPAT F_NEXTVAL_OID
|
#define F_NEXTVAL_COMPAT F_NEXTVAL_OID
|
||||||
|
@ -86,6 +87,8 @@
|
||||||
#define COPY_FRONTEND_COMPAT COPY_NEW_FE
|
#define COPY_FRONTEND_COMPAT COPY_NEW_FE
|
||||||
#define SetTuplestoreDestReceiverParams_compat(a, b, c, d, e, f) \
|
#define SetTuplestoreDestReceiverParams_compat(a, b, c, d, e, f) \
|
||||||
SetTuplestoreDestReceiverParams(a, b, c, d)
|
SetTuplestoreDestReceiverParams(a, b, c, d)
|
||||||
|
#define pgproc_statusflags_compat(pgproc) \
|
||||||
|
((&ProcGlobal->allPgXact[(pgproc)->pgprocno])->vacuumFlags)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if PG_VERSION_NUM >= PG_VERSION_13
|
#if PG_VERSION_NUM >= PG_VERSION_13
|
||||||
|
|
Loading…
Reference in New Issue