Remove spurious code comments in standby related code
authorSimon Riggs
Thu, 14 Jun 2018 11:17:51 +0000 (12:17 +0100)
committerSimon Riggs
Thu, 14 Jun 2018 11:17:51 +0000 (12:17 +0100)
GetRunningTransactionData() suggested that subxids were not worth
optimizing away if overflowed, yet they have already been removed
for that case.

Changes to LogAccessExclusiveLock() API forgot to remove the
prior comment when it was copied to LockAcquire().

src/backend/storage/ipc/procarray.c
src/backend/storage/ipc/standby.c

index 31dddaf0ed5b7a51aa1a74a059f17c811b78a9dd..518c6d74b292d55e11cadf1a860380b9cd24b178 100644 (file)
@@ -1926,9 +1926,7 @@ ProcArrayInstallRestoredXmin(TransactionId xmin, PGPROC *proc)
  * that bookkeeping.
  *
  * Note that if any transaction has overflowed its cached subtransactions
- * then there is no real need include any subtransactions. That isn't a
- * common enough case to worry about optimising the size of the WAL record,
- * and we may wish to see that data for diagnostic purposes anyway.
+ * then there is no real need include any subtransactions.
  */
 RunningTransactions
 GetRunningTransactionData(void)
index 44ed20992edbd01936ae7d496b0cae4f78937a27..38d6db1e12619354b355ff50b22b8ca2c19b7d05 100644 (file)
@@ -1050,11 +1050,6 @@ LogAccessExclusiveLock(Oid dbOid, Oid relOid)
 
    xlrec.xid = GetCurrentTransactionId();
 
-   /*
-    * Decode the locktag back to the original values, to avoid sending lots
-    * of empty bytes with every message.  See lock.h to check how a locktag
-    * is defined for LOCKTAG_RELATION
-    */
    xlrec.dbOid = dbOid;
    xlrec.relOid = relOid;