mirror of https://github.com/citusdata/citus.git
Use macro wrapper to access PGPROC data, which allow to improve compa… (#7607)
DESCRIPTION: Use macro wrapper to access PGPROC data, to improve compatibility with PostgreSQL forks.pull/7609/head
parent
553d5ba15d
commit
fcc72d8a23
|
@ -395,7 +395,7 @@ StoreAllActiveTransactions(Tuplestorestate *tupleStore, TupleDesc tupleDescripto
|
|||
bool showCurrentBackendDetails = showAllBackends;
|
||||
BackendData *currentBackend =
|
||||
&backendManagementShmemData->backends[backendIndex];
|
||||
PGPROC *currentProc = &ProcGlobal->allProcs[backendIndex];
|
||||
PGPROC *currentProc = GetPGProcByNumber(backendIndex);
|
||||
|
||||
/* to work on data after releasing g spinlock to protect against errors */
|
||||
uint64 transactionNumber = 0;
|
||||
|
@ -420,7 +420,7 @@ StoreAllActiveTransactions(Tuplestorestate *tupleStore, TupleDesc tupleDescripto
|
|||
}
|
||||
|
||||
Oid databaseId = currentBackend->databaseId;
|
||||
int backendPid = ProcGlobal->allProcs[backendIndex].pid;
|
||||
int backendPid = GetPGProcByNumber(backendIndex)->pid;
|
||||
|
||||
/*
|
||||
* We prefer to use worker_query instead of distributedCommandOriginator in
|
||||
|
@ -1279,7 +1279,7 @@ ActiveDistributedTransactionNumbers(void)
|
|||
/* build list of starting procs */
|
||||
for (int curBackend = 0; curBackend < MaxBackends; curBackend++)
|
||||
{
|
||||
PGPROC *currentProc = &ProcGlobal->allProcs[curBackend];
|
||||
PGPROC *currentProc = GetPGProcByNumber(curBackend);
|
||||
BackendData currentBackendData;
|
||||
|
||||
if (currentProc->pid == 0)
|
||||
|
|
|
@ -375,7 +375,7 @@ AssociateDistributedTransactionWithBackendProc(TransactionNode *transactionNode)
|
|||
|
||||
for (int backendIndex = 0; backendIndex < MaxBackends; ++backendIndex)
|
||||
{
|
||||
PGPROC *currentProc = &ProcGlobal->allProcs[backendIndex];
|
||||
PGPROC *currentProc = GetPGProcByNumber(backendIndex);
|
||||
BackendData currentBackendData;
|
||||
|
||||
/* we're not interested in processes that are not active or waiting on a lock */
|
||||
|
|
|
@ -559,7 +559,7 @@ BuildLocalWaitGraph(bool onlyDistributedTx)
|
|||
/* build list of starting procs */
|
||||
for (int curBackend = 0; curBackend < totalProcs; curBackend++)
|
||||
{
|
||||
PGPROC *currentProc = &ProcGlobal->allProcs[curBackend];
|
||||
PGPROC *currentProc = GetPGProcByNumber(curBackend);
|
||||
BackendData currentBackendData;
|
||||
|
||||
if (currentProc->pid == 0)
|
||||
|
|
Loading…
Reference in New Issue