Re: Reset waitStart when a lock wait fails

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: shihao zhong <zhong950419(at)gmail(dot)com>
Cc: Andrew Krylosov <krylosov(dot)andrew(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Alex Shapalov <shapalov(at)gmail(dot)com>, Sami Imseih <samimseih(dot)pg(at)gmail(dot)com>
Subject: Re: Reset waitStart when a lock wait fails
Date: 2026-09-28 05:26:38
Message-ID: CAHGQGwEAno940FOJ3kW=ys3KQ94y7GQ2fBNz6i+Wvv09ZsDnhw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 28, 2026 at 12:51 AM shihao zhong <zhong950419(at)gmail(dot)com> wrote:
>
> Hi Andrew,
>
> > 1) I think 0001 is not needed anymore once 0002 is applied. With
> > 0002, the waiting backend always clears waitStart itself when the wait
> > ends at the end of ProcSleep(), or in LockErrorCleanup().
> > RemoveFromWaitQueue() is only called from CheckDeadLock() and
> > LockErrorCleanup(), and both paths reach one of these new resets.
> >
> > Maybe it is simpler to merge 0001 and 0002 into one commit?
> > They fix the same problem and would be backpatched together.
>
> Agreed, v3 merges them into one patch. The code is the same as v2.

Thanks for updating the patch! I made only cosmetic changes and pushed it.

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shihao zhong 2026-09-28 05:39:18 Re: Reset waitStart when a lock wait fails
Previous Message Hayato Kuroda (Fujitsu) 2026-09-28 05:18:01 RE: Bug in logical decoding with DDL and subtransactions