get rid of GTMGetFirstClientIdentifier (unused)
authorTomas Vondra <tomas@2ndquadrant.com>
Tue, 1 Mar 2016 02:48:06 +0000 (03:48 +0100)
committerPavan Deolasee <pavan.deolasee@gmail.com>
Fri, 11 Mar 2016 06:26:19 +0000 (11:56 +0530)
function not used or even defined in a header file

src/gtm/main/gtm_txn.c

index ed971351efad2cbe22ebe58e1a54ee5b49aa4314..999c06e05ddf948523edaab75fff7c6b925f6c0e 100644 (file)
@@ -423,34 +423,6 @@ GTMGetLastClientIdentifier(void)
        return last_client_id;
 }
 
-/*
- * Get the oldest client identifier issued to the currently open transactions.
- */
-uint32
-GTMGetFirstClientIdentifier(void)
-{
-       gtm_ListCell *cell;
-       uint32 first_client_id = UINT32_MAX;
-
-       /*
-        * Scan the global list of open transactions
-        */
-       GTM_RWLockAcquire(&GTMTransactions.gt_TransArrayLock, GTM_LOCKMODE_WRITE);
-
-       cell = gtm_list_head(GTMTransactions.gt_open_transactions);
-       while (cell != NULL)
-       {
-               GTM_TransactionInfo *gtm_txninfo = gtm_lfirst(cell);
-
-               if (GTM_CLIENT_ID_LT(gtm_txninfo->gti_client_id, first_client_id))
-                       first_client_id = gtm_txninfo->gti_client_id;
-               cell = gtm_lnext(cell);
-       }
-
-       GTM_RWLockRelease(&GTMTransactions.gt_TransArrayLock);
-       return first_client_id;
-}
-
 /*
  * GlobalTransactionIdDidCommit
  *             True iff transaction associated with the identifier did commit.