mirror of
https://github.com/postgres/postgres.git
synced 2025-07-23 03:21:12 +03:00
Fix assorted poorly-thought-out message strings: use %u not %d for printing
OIDs, avoid random line breaks in strings somebody might grep for.
This commit is contained in:
@ -11,7 +11,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/storage/ipc/standby.c,v 1.9 2010/01/31 19:01:11 sriggs Exp $
|
* $PostgreSQL: pgsql/src/backend/storage/ipc/standby.c,v 1.10 2010/02/02 22:01:53 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -516,7 +516,7 @@ StandbyAcquireAccessExclusiveLock(TransactionId xid, Oid dbOid, Oid relOid)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
elog(trace_recovery(DEBUG4),
|
elog(trace_recovery(DEBUG4),
|
||||||
"adding recovery lock: db %d rel %d", dbOid, relOid);
|
"adding recovery lock: db %u rel %u", dbOid, relOid);
|
||||||
|
|
||||||
/* dbOid is InvalidOid when we are locking a shared relation. */
|
/* dbOid is InvalidOid when we are locking a shared relation. */
|
||||||
Assert(OidIsValid(relOid));
|
Assert(OidIsValid(relOid));
|
||||||
@ -558,15 +558,13 @@ StandbyReleaseLocks(TransactionId xid)
|
|||||||
LOCKTAG locktag;
|
LOCKTAG locktag;
|
||||||
|
|
||||||
elog(trace_recovery(DEBUG4),
|
elog(trace_recovery(DEBUG4),
|
||||||
"releasing recovery lock: xid %u db %d rel %d",
|
"releasing recovery lock: xid %u db %u rel %u",
|
||||||
lock->xid, lock->dbOid, lock->relOid);
|
lock->xid, lock->dbOid, lock->relOid);
|
||||||
SET_LOCKTAG_RELATION(locktag, lock->dbOid, lock->relOid);
|
SET_LOCKTAG_RELATION(locktag, lock->dbOid, lock->relOid);
|
||||||
if (!LockRelease(&locktag, AccessExclusiveLock, true))
|
if (!LockRelease(&locktag, AccessExclusiveLock, true))
|
||||||
elog(trace_recovery(LOG),
|
elog(trace_recovery(LOG),
|
||||||
"RecoveryLockList contains entry for lock "
|
"RecoveryLockList contains entry for lock no longer recorded by lock manager: xid %u database %u relation %u",
|
||||||
"no longer recorded by lock manager "
|
lock->xid, lock->dbOid, lock->relOid);
|
||||||
"xid %u database %d relation %d",
|
|
||||||
lock->xid, lock->dbOid, lock->relOid);
|
|
||||||
|
|
||||||
RecoveryLockList = list_delete_cell(RecoveryLockList, cell, prev);
|
RecoveryLockList = list_delete_cell(RecoveryLockList, cell, prev);
|
||||||
pfree(lock);
|
pfree(lock);
|
||||||
@ -621,14 +619,12 @@ StandbyReleaseLocksMany(TransactionId removeXid, bool keepPreparedXacts)
|
|||||||
if (keepPreparedXacts && StandbyTransactionIdIsPrepared(lock->xid))
|
if (keepPreparedXacts && StandbyTransactionIdIsPrepared(lock->xid))
|
||||||
continue;
|
continue;
|
||||||
elog(trace_recovery(DEBUG4),
|
elog(trace_recovery(DEBUG4),
|
||||||
"releasing recovery lock: xid %u db %d rel %d",
|
"releasing recovery lock: xid %u db %u rel %u",
|
||||||
lock->xid, lock->dbOid, lock->relOid);
|
lock->xid, lock->dbOid, lock->relOid);
|
||||||
SET_LOCKTAG_RELATION(locktag, lock->dbOid, lock->relOid);
|
SET_LOCKTAG_RELATION(locktag, lock->dbOid, lock->relOid);
|
||||||
if (!LockRelease(&locktag, AccessExclusiveLock, true))
|
if (!LockRelease(&locktag, AccessExclusiveLock, true))
|
||||||
elog(trace_recovery(LOG),
|
elog(trace_recovery(LOG),
|
||||||
"RecoveryLockList contains entry for lock "
|
"RecoveryLockList contains entry for lock no longer recorded by lock manager: xid %u database %u relation %u",
|
||||||
"no longer recorded by lock manager "
|
|
||||||
"xid %u database %d relation %d",
|
|
||||||
lock->xid, lock->dbOid, lock->relOid);
|
lock->xid, lock->dbOid, lock->relOid);
|
||||||
RecoveryLockList = list_delete_cell(RecoveryLockList, cell, prev);
|
RecoveryLockList = list_delete_cell(RecoveryLockList, cell, prev);
|
||||||
pfree(lock);
|
pfree(lock);
|
||||||
@ -708,8 +704,7 @@ standby_desc_running_xacts(StringInfo buf, xl_running_xacts *xlrec)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
appendStringInfo(buf,
|
appendStringInfo(buf, " nextXid %u oldestRunningXid %u",
|
||||||
" nextXid %u oldestRunningXid %u",
|
|
||||||
xlrec->nextXid,
|
xlrec->nextXid,
|
||||||
xlrec->oldestRunningXid);
|
xlrec->oldestRunningXid);
|
||||||
if (xlrec->xcnt > 0)
|
if (xlrec->xcnt > 0)
|
||||||
@ -736,7 +731,7 @@ standby_desc(StringInfo buf, uint8 xl_info, char *rec)
|
|||||||
appendStringInfo(buf, "AccessExclusive locks:");
|
appendStringInfo(buf, "AccessExclusive locks:");
|
||||||
|
|
||||||
for (i = 0; i < xlrec->nlocks; i++)
|
for (i = 0; i < xlrec->nlocks; i++)
|
||||||
appendStringInfo(buf, " xid %u db %d rel %d",
|
appendStringInfo(buf, " xid %u db %u rel %u",
|
||||||
xlrec->locks[i].xid, xlrec->locks[i].dbOid,
|
xlrec->locks[i].xid, xlrec->locks[i].dbOid,
|
||||||
xlrec->locks[i].relOid);
|
xlrec->locks[i].relOid);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user