File tree Expand file tree Collapse file tree 2 files changed +0
-53
lines changed Expand file tree Collapse file tree 2 files changed +0
-53
lines changed Original file line number Diff line number Diff line change @@ -1622,58 +1622,6 @@ TransactionIdIsInProgress(TransactionId xid)
16221622 return false;
16231623}
16241624
1625- /*
1626- * TransactionIdIsActive -- is xid the top-level XID of an active backend?
1627- *
1628- * This differs from TransactionIdIsInProgress in that it ignores prepared
1629- * transactions, as well as transactions running on the primary if we're in
1630- * hot standby. Also, we ignore subtransactions since that's not needed
1631- * for current uses.
1632- */
1633- bool
1634- TransactionIdIsActive (TransactionId xid )
1635- {
1636- bool result = false;
1637- ProcArrayStruct * arrayP = procArray ;
1638- TransactionId * other_xids = ProcGlobal -> xids ;
1639- int i ;
1640-
1641- /*
1642- * Don't bother checking a transaction older than RecentXmin; it could not
1643- * possibly still be running.
1644- */
1645- if (TransactionIdPrecedes (xid , RecentXmin ))
1646- return false;
1647-
1648- LWLockAcquire (ProcArrayLock , LW_SHARED );
1649-
1650- for (i = 0 ; i < arrayP -> numProcs ; i ++ )
1651- {
1652- int pgprocno = arrayP -> pgprocnos [i ];
1653- PGPROC * proc = & allProcs [pgprocno ];
1654- TransactionId pxid ;
1655-
1656- /* Fetch xid just once - see GetNewTransactionId */
1657- pxid = UINT32_ACCESS_ONCE (other_xids [i ]);
1658-
1659- if (!TransactionIdIsValid (pxid ))
1660- continue ;
1661-
1662- if (proc -> pid == 0 )
1663- continue ; /* ignore prepared transactions */
1664-
1665- if (TransactionIdEquals (pxid , xid ))
1666- {
1667- result = true;
1668- break ;
1669- }
1670- }
1671-
1672- LWLockRelease (ProcArrayLock );
1673-
1674- return result ;
1675- }
1676-
16771625
16781626/*
16791627 * Determine XID horizons.
Original file line number Diff line number Diff line change @@ -53,7 +53,6 @@ extern bool ProcArrayInstallRestoredXmin(TransactionId xmin, PGPROC *proc);
5353extern RunningTransactions GetRunningTransactionData (void );
5454
5555extern bool TransactionIdIsInProgress (TransactionId xid );
56- extern bool TransactionIdIsActive (TransactionId xid );
5756extern TransactionId GetOldestNonRemovableTransactionId (Relation rel );
5857extern TransactionId GetOldestTransactionIdConsideredRunning (void );
5958extern TransactionId GetOldestActiveTransactionId (void );
You can’t perform that action at this time.
0 commit comments