Re: Fix bug of clearing of waitStart in ProcWakeup()

Fujii Masao <masao.fujii@gmail.com>

From: Fujii Masao <masao.fujii@gmail.com>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: ji xu <thanksgreed@gmail.com>, Chao Li <li.evan.chao@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-02-24T16:37:13Z
Lists: pgsql-hackers

Attachments

On Wed, Feb 25, 2026 at 1:12 AM Álvaro Herrera <alvherre@kurilemu.de> wrote:
>
> On 2026-Feb-24, ji xu wrote:
>
> > Chao Li <li.evan.chao@gmail.com> 于2026年2月24日周二 14:29写道:
> >
> > > ```
> > > PGPROC *
> > > ProcWakeup(PGPROC *proc, ProcWaitStatus waitStatus)
> > > {
>
> > >         pg_atomic_write_u64(&MyProc->waitStart, 0); <== Here, it should
> > > operate on proc
>
> I agree that this looks wrong.  AFAICS it comes from 46d6e5f56790.

Yes, it's my mistake...

For the record, patch attached.

Regards,

-- 
Fujii Masao

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix ProcWakeup() resetting wrong waitStart field.