/*
* BackendPidGetProc -- get a backend's PGPROC given its PID
- *
+ *
* Returns NULL if not found. Note that it is up to the caller to be
* sure that the question remains meaningful for long enough for the
* answer to be used ...
return result;
}
-/*
- * BackendXidGetProc -- get a backend's PGPROC given its XID
- *
- * Returns NULL if not found. Note that it is up to the caller to be
- * sure that the question remains meaningful for long enough for the
- * answer to be used ...
- */
-PGPROC *
-BackendXidGetProc(TransactionId xid)
-{
- PGPROC *result = NULL;
- ProcArrayStruct *arrayP = procArray;
- int index;
-
- if (xid == InvalidTransactionId) /* never match invalid xid */
- return 0;
-
- LWLockAcquire(ProcArrayLock, LW_SHARED);
-
- for (index = 0; index < arrayP->numProcs; index++)
- {
- PGPROC *proc = arrayP->procs[index];
-
- if (proc->xid == xid)
- {
- result = proc;
- break;
- }
- }
-
- LWLockRelease(ProcArrayLock);
-
- return result;
-}
-
/*
* BackendXidGetPid -- get a backend's pid given its XID
*
#define SK_BT_DESC (INDOPTION_DESC << SK_BT_INDOPTION_SHIFT)
#define SK_BT_NULLS_FIRST (INDOPTION_NULLS_FIRST << SK_BT_INDOPTION_SHIFT)
-/* XXX probably needs new RMgr call to do this cleanly */
-extern bool btree_is_cleanup_record(uint8 info);
-extern bool btree_needs_cleanup_lock(uint8 info);
-
/*
* prototypes for functions in nbtree.c (external entry points for btree)
*/
extern bool HaveTransactionsInCommit(TransactionId *xids, int nxids);
extern PGPROC *BackendPidGetProc(int pid);
-extern PGPROC *BackendXidGetProc(TransactionId xid);
extern int BackendXidGetPid(TransactionId xid);
extern bool IsBackendPid(int pid);