diff --git a/src/backend/distributed/transaction/lock_graph.c b/src/backend/distributed/transaction/lock_graph.c index aed021ae0..9265bd320 100644 --- a/src/backend/distributed/transaction/lock_graph.c +++ b/src/backend/distributed/transaction/lock_graph.c @@ -456,7 +456,7 @@ BuildLocalWaitGraph(void) static bool IsProcessWaitingForSafeOperations(PGPROC *proc) { - if (proc->waitStatus != STATUS_WAITING) + if (proc->waitStatus != PROC_WAIT_STATUS_WAITING) { return false; } @@ -715,7 +715,7 @@ AddProcToVisit(PROCStack *remaining, PGPROC *proc) bool IsProcessWaitingForLock(PGPROC *proc) { - return proc->waitStatus == STATUS_WAITING; + return proc->waitStatus == PROC_WAIT_STATUS_WAITING; } diff --git a/src/include/distributed/version_compat.h b/src/include/distributed/version_compat.h index 5bea3c427..9581d3804 100644 --- a/src/include/distributed/version_compat.h +++ b/src/include/distributed/version_compat.h @@ -34,10 +34,12 @@ #define AlterTableStmtObjType(a) ((a)->objtype) #define F_NEXTVAL_COMPAT F_NEXTVAL #define ROLE_MONITOR_COMPAT ROLE_PG_MONITOR +#define STATUS_WAITING_COMPAT PROC_WAIT_STATUS_WAITING #else #define AlterTableStmtObjType(a) ((a)->relkind) #define F_NEXTVAL_COMPAT F_NEXTVAL_OID #define ROLE_MONITOR_COMPAT DEFAULT_ROLE_MONITOR +#define STATUS_WAITING_COMPAT STATUS_WAITING #endif #if PG_VERSION_NUM >= PG_VERSION_13