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 any lock state cleanup after the call to
941+ * NOTE: Think not to put any shared- 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