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

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Cc: ji xu <thanksgreed(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix bug of clearing of waitStart in ProcWakeup()
Date: 2026-02-24 16:37:13
Message-ID: CAHGQGwHFGJeaWwy_0hCB57o+D3YhWi_zNPkwjpqfQpeiE2jZsA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 25, 2026 at 1:12 AM Álvaro Herrera <alvherre(at)kurilemu(dot)de> wrote:
>
> On 2026-Feb-24, ji xu wrote:
>
> > Chao Li <li(dot)evan(dot)chao(at)gmail(dot)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

Attachment Content-Type Size
v1-0001-Fix-ProcWakeup-resetting-wrong-waitStart-field.patch application/octet-stream 1.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2026-02-24 17:01:45 Re: Proposal: ANALYZE (MODIFIED_STATS) using autoanalyze thresholds
Previous Message Bertrand Drouvot 2026-02-24 16:33:49 Re: Don't cast away const where possible