]> granicus.if.org Git - postgresql/commitdiff
Change some debug ereports to elogs, as requested by translation team.
authorSimon Riggs <simon@2ndQuadrant.com>
Tue, 6 Apr 2010 10:50:57 +0000 (10:50 +0000)
committerSimon Riggs <simon@2ndQuadrant.com>
Tue, 6 Apr 2010 10:50:57 +0000 (10:50 +0000)
src/backend/storage/ipc/procarray.c
src/backend/storage/ipc/standby.c

index e927759258948e88ae0b10892482b6da3d202daf..ac85d2fc29870bd6ad4c322f44f4305b2888711e 100644 (file)
@@ -37,7 +37,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/storage/ipc/procarray.c,v 1.61 2010/03/11 09:26:59 heikki Exp $
+ *       $PostgreSQL: pgsql/src/backend/storage/ipc/procarray.c,v 1.62 2010/04/06 10:50:57 sriggs Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -2220,9 +2220,8 @@ RecordKnownAssignedTransactionIds(TransactionId xid)
        if (TransactionIdPrecedes(xid, snapshotOldestActiveXid))
                return;
 
-       ereport(trace_recovery(DEBUG4),
-                       (errmsg("record known xact %u latestObservedXid %u",
-                                       xid, latestObservedXid)));
+       elog(trace_recovery(DEBUG4), "record known xact %u latestObservedXid %u",
+                                       xid, latestObservedXid);
 
        /*
         * When a newly observed xid arrives, it is frequently the case that it is
@@ -2253,9 +2252,9 @@ RecordKnownAssignedTransactionIds(TransactionId xid)
                while (TransactionIdPrecedesOrEquals(next_expected_xid, xid))
                {
                        if (TransactionIdPrecedes(next_expected_xid, xid))
-                               ereport(trace_recovery(DEBUG4),
-                               (errmsg("recording unobserved xid %u (latestObservedXid %u)",
-                                               next_expected_xid, latestObservedXid)));
+                               elog(trace_recovery(DEBUG4),
+                                        "recording unobserved xid %u (latestObservedXid %u)",
+                                               next_expected_xid, latestObservedXid);
                        KnownAssignedXidsAdd(&next_expected_xid, 1);
 
                        /*
@@ -2374,9 +2373,7 @@ KnownAssignedXidsAdd(TransactionId *xids, int nxids)
                {
                        KnownAssignedXidsDisplay(LOG);
                        LWLockRelease(ProcArrayLock);
-                       ereport(ERROR,
-                                       (errcode(ERRCODE_OUT_OF_MEMORY),
-                                        errmsg("too many KnownAssignedXids")));
+                       elog(ERROR, "too many KnownAssignedXids (%u)", procArray->maxKnownAssignedXids);
                }
 
                result = (TransactionId *) hash_search(KnownAssignedXidsHash, &xids[i], HASH_ENTER,
index 969cd2509fac53475c86b17efe1039fd1bd2294c..38fb912d5dc6ba8baeb05064d7b6a2e12e3bb5de 100644 (file)
@@ -11,7 +11,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/storage/ipc/standby.c,v 1.15 2010/03/11 09:10:25 heikki Exp $
+ *       $PostgreSQL: pgsql/src/backend/storage/ipc/standby.c,v 1.16 2010/04/06 10:50:57 sriggs Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -857,19 +857,19 @@ LogCurrentRunningXacts(RunningTransactions CurrRunningXacts)
        recptr = XLogInsert(RM_STANDBY_ID, XLOG_RUNNING_XACTS, rdata);
 
        if (CurrRunningXacts->subxid_overflow)
-               ereport(trace_recovery(DEBUG2),
-                               (errmsg("snapshot of %u running transactions overflowed (lsn %X/%X oldest xid %u next xid %u)",
+               elog(trace_recovery(DEBUG2),
+                                               "snapshot of %u running transactions overflowed (lsn %X/%X oldest xid %u next xid %u)",
                                                CurrRunningXacts->xcnt,
                                                recptr.xlogid, recptr.xrecoff,
                                                CurrRunningXacts->oldestRunningXid,
-                                               CurrRunningXacts->nextXid)));
+                                               CurrRunningXacts->nextXid);
        else
-               ereport(trace_recovery(DEBUG2),
-                               (errmsg("snapshot of %u running transaction ids (lsn %X/%X oldest xid %u next xid %u)",
+               elog(trace_recovery(DEBUG2),
+                                               "snapshot of %u running transaction ids (lsn %X/%X oldest xid %u next xid %u)",
                                                CurrRunningXacts->xcnt,
                                                recptr.xlogid, recptr.xrecoff,
                                                CurrRunningXacts->oldestRunningXid,
-                                               CurrRunningXacts->nextXid)));
+                                               CurrRunningXacts->nextXid);
 
 }