Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitab7c49c

Browse files
committed
Fix assorted poorly-thought-out message strings: use %u not %d for printing
OIDs, avoid random line breaks in strings somebody might grep for.
1 parentc98157d commitab7c49c

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

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

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1994, Regents of the University of California
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/storage/ipc/standby.c,v 1.9 2010/01/31 19:01:11 sriggs Exp $
14+
* $PostgreSQL: pgsql/src/backend/storage/ipc/standby.c,v 1.10 2010/02/02 22:01:53 tgl Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -516,7 +516,7 @@ StandbyAcquireAccessExclusiveLock(TransactionId xid, Oid dbOid, Oid relOid)
516516
return;
517517

518518
elog(trace_recovery(DEBUG4),
519-
"adding recovery lock: db %d rel %d",dbOid,relOid);
519+
"adding recovery lock: db %u rel %u",dbOid,relOid);
520520

521521
/* dbOid is InvalidOid when we are locking a shared relation. */
522522
Assert(OidIsValid(relOid));
@@ -558,15 +558,13 @@ StandbyReleaseLocks(TransactionId xid)
558558
LOCKTAGlocktag;
559559

560560
elog(trace_recovery(DEBUG4),
561-
"releasing recovery lock: xid %u db %d rel %d",
562-
lock->xid,lock->dbOid,lock->relOid);
561+
"releasing recovery lock: xid %u db %u rel %u",
562+
lock->xid,lock->dbOid,lock->relOid);
563563
SET_LOCKTAG_RELATION(locktag,lock->dbOid,lock->relOid);
564564
if (!LockRelease(&locktag,AccessExclusiveLock, true))
565565
elog(trace_recovery(LOG),
566-
"RecoveryLockList contains entry for lock "
567-
"no longer recorded by lock manager "
568-
"xid %u database %d relation %d",
569-
lock->xid,lock->dbOid,lock->relOid);
566+
"RecoveryLockList contains entry for lock no longer recorded by lock manager: xid %u database %u relation %u",
567+
lock->xid,lock->dbOid,lock->relOid);
570568

571569
RecoveryLockList=list_delete_cell(RecoveryLockList,cell,prev);
572570
pfree(lock);
@@ -621,14 +619,12 @@ StandbyReleaseLocksMany(TransactionId removeXid, bool keepPreparedXacts)
621619
if (keepPreparedXacts&&StandbyTransactionIdIsPrepared(lock->xid))
622620
continue;
623621
elog(trace_recovery(DEBUG4),
624-
"releasing recovery lock: xid %u db %d rel %d",
622+
"releasing recovery lock: xid %u db %u rel %u",
625623
lock->xid,lock->dbOid,lock->relOid);
626624
SET_LOCKTAG_RELATION(locktag,lock->dbOid,lock->relOid);
627625
if (!LockRelease(&locktag,AccessExclusiveLock, true))
628626
elog(trace_recovery(LOG),
629-
"RecoveryLockList contains entry for lock "
630-
"no longer recorded by lock manager "
631-
"xid %u database %d relation %d",
627+
"RecoveryLockList contains entry for lock no longer recorded by lock manager: xid %u database %u relation %u",
632628
lock->xid,lock->dbOid,lock->relOid);
633629
RecoveryLockList=list_delete_cell(RecoveryLockList,cell,prev);
634630
pfree(lock);
@@ -708,8 +704,7 @@ standby_desc_running_xacts(StringInfo buf, xl_running_xacts *xlrec)
708704
{
709705
inti;
710706

711-
appendStringInfo(buf,
712-
" nextXid %u oldestRunningXid %u",
707+
appendStringInfo(buf," nextXid %u oldestRunningXid %u",
713708
xlrec->nextXid,
714709
xlrec->oldestRunningXid);
715710
if (xlrec->xcnt>0)
@@ -736,7 +731,7 @@ standby_desc(StringInfo buf, uint8 xl_info, char *rec)
736731
appendStringInfo(buf,"AccessExclusive locks:");
737732

738733
for (i=0;i<xlrec->nlocks;i++)
739-
appendStringInfo(buf," xid %u db %d rel %d",
734+
appendStringInfo(buf," xid %u db %u rel %u",
740735
xlrec->locks[i].xid,xlrec->locks[i].dbOid,
741736
xlrec->locks[i].relOid);
742737
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp