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

Commitddc5bc9

Browse files
committed
When we add 'waiting' to the ps_status display, there should be a
space in front of it. Improve comments a little.
1 parent934126b commitddc5bc9

File tree

1 file changed

+6
-5
lines changed
  • src/backend/storage/lmgr

1 file changed

+6
-5
lines changed

‎src/backend/storage/lmgr/lock.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.86 2001/03/14 18:24:32 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.87 2001/03/18 20:13:13 tgl Exp $
1212
*
1313
* NOTES
1414
* Outside modules can create a lock table and acquire/release
@@ -934,19 +934,21 @@ WaitOnLock(LOCKMETHOD lockmethod, LOCKMODE lockmode,
934934
old_status=pstrdup(get_ps_display());
935935
new_status= (char*)palloc(strlen(old_status)+10);
936936
strcpy(new_status,old_status);
937-
strcat(new_status,"waiting");
937+
strcat(new_status,"waiting");
938938
set_ps_display(new_status);
939939

940940
/*
941-
* NOTE: Think not to put anylockstate cleanup after the call to
941+
* NOTE: Think not to put anyshared-state cleanup after the call to
942942
* ProcSleep, in either the normal or failure path. The lock state
943943
* must be fully set by the lock grantor, or by HandleDeadLock if we
944944
* give up waiting for the lock. This is necessary because of the
945945
* possibility that a cancel/die interrupt will interrupt ProcSleep
946946
* after someone else grants us the lock, but before we've noticed it.
947947
* Hence, after granting, the locktable state must fully reflect the
948948
* fact that we own the lock; we can't do additional work on return.
949-
*
949+
* Contrariwise, if we fail, any cleanup must happen in xact abort
950+
* processing, not here, to ensure it will also happen in the cancel/die
951+
* case.
950952
*/
951953

952954
if (ProcSleep(lockMethodTable,
@@ -958,7 +960,6 @@ WaitOnLock(LOCKMETHOD lockmethod, LOCKMODE lockmode,
958960
* We failed as a result of a deadlock, see HandleDeadLock().
959961
* Quit now. Removal of the holder and lock objects, if no longer
960962
* needed, will happen in xact cleanup (see above for motivation).
961-
*
962963
*/
963964
LOCK_PRINT("WaitOnLock: aborting on lock",lock,lockmode);
964965
SpinRelease(lockMethodTable->ctl->masterLock);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp