1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-12 16:21:30 +03:00

Fix typo and comments related to the recent no-wait lock improvements

The argument of dontWait at the top of ProcSleep() was documented
backwards, and there was a typo in lock.c.

Thinkos in 2346df6fc373.

Author: Will Mortensen
Reviewed-by: Jingxian Li, Michael Paquier
Discussion: https://postgr.es/m/CAMpnoC5f+eiS7tdy8PUpd_LacSTVT-pYpVooKfjHRQQmkHPZ2g@mail.gmail.com
This commit is contained in:
Michael Paquier 2024-05-23 13:47:12 +09:00
parent dd087e1c13
commit f7ab71ba0c
2 changed files with 3 additions and 3 deletions

View File

@ -1060,7 +1060,7 @@ LockAcquireExtended(const LOCKTAG *locktag,
/* /*
* Check the proclock entry status. If dontWait = true, this is an * Check the proclock entry status. If dontWait = true, this is an
* expected case; otherwise, it will open happen if something in the * expected case; otherwise, it will only happen if something in the
* ipc communication doesn't work correctly. * ipc communication doesn't work correctly.
*/ */
if (!(proclock->holdMask & LOCKBIT_ON(lockmode))) if (!(proclock->holdMask & LOCKBIT_ON(lockmode)))

View File

@ -1054,8 +1054,8 @@ AuxiliaryPidGetProc(int pid)
* at exit. * at exit.
* *
* Result: PROC_WAIT_STATUS_OK if we acquired the lock, PROC_WAIT_STATUS_ERROR * Result: PROC_WAIT_STATUS_OK if we acquired the lock, PROC_WAIT_STATUS_ERROR
* if not (if dontWait = true, this is a deadlock; if dontWait = false, we * if not (if dontWait = true, we would have had to wait; if dontWait = false,
* would have had to wait). * this is a deadlock).
* *
* ASSUME: that no one will fiddle with the queue until after * ASSUME: that no one will fiddle with the queue until after
* we release the partition lock. * we release the partition lock.