From: Simon Riggs Date: Tue, 6 Apr 2010 10:50:57 +0000 (+0000) Subject: Change some debug ereports to elogs, as requested by translation team. X-Git-Tag: REL9_0_BETA1~99 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=19c7a59b56f1c27065d51e1349a87dde497c9a3f;p=postgresql Change some debug ereports to elogs, as requested by translation team. --- diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c index e927759258..ac85d2fc29 100644 --- a/src/backend/storage/ipc/procarray.c +++ b/src/backend/storage/ipc/procarray.c @@ -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, diff --git a/src/backend/storage/ipc/standby.c b/src/backend/storage/ipc/standby.c index 969cd2509f..38fb912d5d 100644 --- a/src/backend/storage/ipc/standby.c +++ b/src/backend/storage/ipc/standby.c @@ -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); }