Re: [PATCH] LockAcquireExtended improvement

From: Will Mortensen <will(at)extrahop(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Jingxian Li <aqktjcm(at)qq(dot)com>, andres <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] LockAcquireExtended improvement
Date: 2024-03-27 02:14:32
Message-ID: CAMpnoC5f+eiS7tdy8PUpd_LacSTVT-pYpVooKfjHRQQmkHPZ2g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 14, 2024 at 1:15 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> Seeing no further discussion, I have committed my version of this
> patch, with your test case.

This comment on ProcSleep() seems to have the values of dontWait
backward (double negatives are tricky):

* 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
* would have had to wait).

Also there's a minor typo in a comment in LockAcquireExtended():

* Check the proclock entry status. If dontWait = true, this is an
* expected case; otherwise, it will open happen if something in the
* ipc communication doesn't work correctly.

"open" should be "only".

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2024-03-27 02:40:50 Re: recovery modules
Previous Message Masahiko Sawada 2024-03-27 02:11:58 Re: Add new error_action COPY ON_ERROR "log"