Introduces STATUS_WAITING_COMPAT macro

The STATUS_WAITING define is removed and an enum with PROC_WAIT_STATUS_WAITING is added instead
This macro uses appropriate one

Relevant PG commit:
a513f1dfbf2c29a51b0f7cbd5913ce2d2ee452c5
talha_pg14_support
Halil Ozan Akgul 2021-08-11 15:47:41 +03:00 committed by Sait Talha Nisanci
parent f6996e803c
commit 89986d70b1
2 changed files with 4 additions and 2 deletions

View File

@ -456,7 +456,7 @@ BuildLocalWaitGraph(void)
static bool static bool
IsProcessWaitingForSafeOperations(PGPROC *proc) IsProcessWaitingForSafeOperations(PGPROC *proc)
{ {
if (proc->waitStatus != STATUS_WAITING) if (proc->waitStatus != STATUS_WAITING_COMPAT)
{ {
return false; return false;
} }
@ -715,7 +715,7 @@ AddProcToVisit(PROCStack *remaining, PGPROC *proc)
bool bool
IsProcessWaitingForLock(PGPROC *proc) IsProcessWaitingForLock(PGPROC *proc)
{ {
return proc->waitStatus == STATUS_WAITING; return proc->waitStatus == STATUS_WAITING_COMPAT;
} }

View File

@ -34,10 +34,12 @@
#define AlterTableStmtObjType(a) ((a)->objtype) #define AlterTableStmtObjType(a) ((a)->objtype)
#define F_NEXTVAL_COMPAT F_NEXTVAL #define F_NEXTVAL_COMPAT F_NEXTVAL
#define ROLE_MONITOR_COMPAT ROLE_PG_MONITOR #define ROLE_MONITOR_COMPAT ROLE_PG_MONITOR
#define STATUS_WAITING_COMPAT PROC_WAIT_STATUS_WAITING
#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
#define ROLE_MONITOR_COMPAT DEFAULT_ROLE_MONITOR #define ROLE_MONITOR_COMPAT DEFAULT_ROLE_MONITOR
#define STATUS_WAITING_COMPAT STATUS_WAITING
#endif #endif
#if PG_VERSION_NUM >= PG_VERSION_13 #if PG_VERSION_NUM >= PG_VERSION_13