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

Álvaro Herrera <alvherre@kurilemu.de>

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

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
[…] indem ich in meinem Leben oft an euch gedacht, euch glücklich zu machen. Seyd es!
A menudo he pensado en vosotros, en haceros felices. ¡Sedlo, pues!
		Heiligenstädter Testament, L. v. Beethoven, 1802
		https://de.wikisource.org/wiki/Heiligenstädter_Testament



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.