pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed[PATCH v1] Log details for stats dropped more than once
10+ messages / 5 participants
[nested] [flat]
Commits from this thread:
2026-02-25 70f470314c 0d3be05017 f72c92a7f9 b993706787 74ee3e9e73 5d2dec77ef Fix ProcWakeup() resetting wrong waitStart field.
* [PATCH v1] Log details for stats dropped more than once
@ 2024-05-14 09:10 Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
0 siblings, 0 replies; 10+ messages in thread
From: Bertrand Drouvot @ 2024-05-14 09:10 UTC (permalink / raw)
Adding errdetail_internal() in pgstat_drop_entry_internal() to display the
PgStat_HashKey when the "can only drop stats once" error is reported.
---
src/backend/utils/activity/pgstat_shmem.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
100.0% src/backend/utils/activity/
inline patch 1: src/backend/utils/activity/pgstat_shmem.c (+5/-1 lines) download inline-1.patch
diff --git a/src/backend/utils/activity/pgstat_shmem.c b/src/backend/utils/activity/pgstat_shmem.c
index 91591da395..1308c4439a 100644
--- a/src/backend/utils/activity/pgstat_shmem.c
+++ b/src/backend/utils/activity/pgstat_shmem.c
@@ -785,7 +785,11 @@ pgstat_drop_entry_internal(PgStatShared_HashEntry *shent,
* backends to release their references.
*/
if (shent->dropped)
- elog(ERROR, "can only drop stats once");
+ ereport(ERROR,
+ errmsg("can only drop stats once"),
+ errdetail_internal("Stats kind=%s dboid=%u objoid=%u.",
+ pgstat_get_kind_info(shent->key.kind)->name,
+ shent->key.dboid, shent->key.objoid));
shent->dropped = true;
/* release refcount marking entry as not dropped */
--
2.34.1
--qS8sjQN0UyT4zcze--
^ permalink raw reply [nested|flat] 10+ messages in thread
* [PATCH v2] Log details for stats dropped more than once
@ 2024-05-14 09:10 Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
0 siblings, 0 replies; 10+ messages in thread
From: Bertrand Drouvot @ 2024-05-14 09:10 UTC (permalink / raw)
Adding errdetail_internal() in pgstat_drop_entry_internal() to display the
PgStat_HashKey and the entry's refcount when the "can only drop stats once"
error is reported.
---
src/backend/utils/activity/pgstat_shmem.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
100.0% src/backend/utils/activity/
inline patch 1: src/backend/utils/activity/pgstat_shmem.c (+6/-1 lines) download inline-1.patch
diff --git a/src/backend/utils/activity/pgstat_shmem.c b/src/backend/utils/activity/pgstat_shmem.c
index 91591da395..0595c08d6e 100644
--- a/src/backend/utils/activity/pgstat_shmem.c
+++ b/src/backend/utils/activity/pgstat_shmem.c
@@ -785,7 +785,12 @@ pgstat_drop_entry_internal(PgStatShared_HashEntry *shent,
* backends to release their references.
*/
if (shent->dropped)
- elog(ERROR, "can only drop stats once");
+ ereport(ERROR,
+ errmsg("can only drop stats once"),
+ errdetail_internal("Stats kind=%s dboid=%u objoid=%u refcount=%u.",
+ pgstat_get_kind_info(shent->key.kind)->name,
+ shent->key.dboid, shent->key.objoid,
+ pg_atomic_read_u32(&shent->refcount)));
shent->dropped = true;
/* release refcount marking entry as not dropped */
--
2.34.1
--/8qMM0nayze5naH5--
^ permalink raw reply [nested|flat] 10+ messages in thread
* Fix bug of clearing of waitStart in ProcWakeup()
@ 2026-02-24 06:28 Chao Li <li.evan.chao@gmail.com>
2026-02-24 07:31 ` Re: Fix bug of clearing of waitStart in ProcWakeup() ji xu <thanksgreed@gmail.com>
0 siblings, 1 reply; 10+ messages in thread
From: Chao Li @ 2026-02-24 06:28 UTC (permalink / raw)
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Hi,
I just noticed this while reviewing patch [1]. It looks like this is caused by a simple typo.
In ProcWakeup():
```
PGPROC *
ProcWakeup(PGPROC *proc, ProcWaitStatus waitStatus)
{
PGPROC *retProc;
/* Proc should be sleeping ... */
if (proc->links.prev == NULL ||
proc->links.next == NULL)
return NULL;
Assert(proc->waitStatus == PROC_WAIT_STATUS_WAITING);
/* Save next process before we zap the list link */
retProc = (PGPROC *) proc->links.next;
/* Remove process from wait queue */
SHMQueueDelete(&(proc->links));
(proc->waitLock->waitProcs.size)--;
/* Clean up process' state and pass it the ok/fail signal */
proc->waitLock = NULL;
proc->waitProcLock = NULL;
proc->waitStatus = waitStatus;
pg_atomic_write_u64(&MyProc->waitStart, 0); <== Here, it should operate on proc
/* And awaken it */
SetLatch(&proc->procLatch);
return retProc;
}
```
Since this function is clearly operating on the parameter proc, the only statement that touches MyProc looks suspicious. It should reset proc->waitStart, not MyProc->waitStart.
As written, it will incorrectly clear the caller’s waitStart instead of the awakened backend’s, potentially leaving a stale waitStart value in the target PGPROC.
[1] https://postgr.es/m/CAHGQGwGw4LhNwOGQT3nbw3uWy8gL94_MB4T39Wfr4_Vgopuovg@mail.gmail.com
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Fix bug of clearing of waitStart in ProcWakeup()
2026-02-24 06:28 Fix bug of clearing of waitStart in ProcWakeup() Chao Li <li.evan.chao@gmail.com>
@ 2026-02-24 07:31 ` ji xu <thanksgreed@gmail.com>
2026-02-24 15:41 ` Re: Fix bug of clearing of waitStart in ProcWakeup() Fujii Masao <masao.fujii@gmail.com>
2026-02-24 16:12 ` Re: Fix bug of clearing of waitStart in ProcWakeup() Álvaro Herrera <alvherre@kurilemu.de>
0 siblings, 2 replies; 10+ messages in thread
From: ji xu @ 2026-02-24 07:31 UTC (permalink / raw)
To: Chao Li <li.evan.chao@gmail.com>; +Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Chao Li <li.evan.chao@gmail.com> 于2026年2月24日周二 14:29写道:
> Hi,
>
> I just noticed this while reviewing patch [1]. It looks like this is
> caused by a simple typo.
>
> In ProcWakeup():
> ```
> PGPROC *
> ProcWakeup(PGPROC *proc, ProcWaitStatus waitStatus)
> {
> PGPROC *retProc;
>
> /* Proc should be sleeping ... */
> if (proc->links.prev == NULL ||
> proc->links.next == NULL)
> return NULL;
> Assert(proc->waitStatus == PROC_WAIT_STATUS_WAITING);
>
> /* Save next process before we zap the list link */
> retProc = (PGPROC *) proc->links.next;
>
> /* Remove process from wait queue */
> SHMQueueDelete(&(proc->links));
> (proc->waitLock->waitProcs.size)--;
>
> /* Clean up process' state and pass it the ok/fail signal */
> proc->waitLock = NULL;
> proc->waitProcLock = NULL;
> proc->waitStatus = waitStatus;
> pg_atomic_write_u64(&MyProc->waitStart, 0); <== Here, it should
> operate on proc
>
> /* And awaken it */
> SetLatch(&proc->procLatch);
>
> return retProc;
> }
> ```
>
> Since this function is clearly operating on the parameter proc, the only
> statement that touches MyProc looks suspicious. It should reset
> proc->waitStart, not MyProc->waitStart.
>
> As written, it will incorrectly clear the caller’s waitStart instead of
> the awakened backend’s, potentially leaving a stale waitStart value in the
> target PGPROC.
>
> [1]
> https://postgr.es/m/CAHGQGwGw4LhNwOGQT3nbw3uWy8gL94_MB4T39Wfr4_Vgopuovg@mail.gmail.com
>
> Best regards,
> --
> Chao Li (Evan)
> HighGo Software Co., Ltd.
> https://www.highgo.com/
>
>
>
>
>
>
>
Hi ,
The fix looks correct to me. I applied it locally and build and "make
check" passed from my side.
Regards,
ji xu
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Fix bug of clearing of waitStart in ProcWakeup()
2026-02-24 06:28 Fix bug of clearing of waitStart in ProcWakeup() Chao Li <li.evan.chao@gmail.com>
2026-02-24 07:31 ` Re: Fix bug of clearing of waitStart in ProcWakeup() ji xu <thanksgreed@gmail.com>
@ 2026-02-24 15:41 ` Fujii Masao <masao.fujii@gmail.com>
2026-02-24 22:03 ` Re: Fix bug of clearing of waitStart in ProcWakeup() Chao Li <li.evan.chao@gmail.com>
1 sibling, 1 reply; 10+ messages in thread
From: Fujii Masao @ 2026-02-24 15:41 UTC (permalink / raw)
To: ji xu <thanksgreed@gmail.com>; +Cc: Chao Li <li.evan.chao@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
On Tue, Feb 24, 2026 at 4:31 PM ji xu <thanksgreed@gmail.com> wrote:
>
>
> Chao Li <li.evan.chao@gmail.com> 于2026年2月24日周二 14:29写道:
>>
>> Since this function is clearly operating on the parameter proc, the only statement that touches MyProc looks suspicious. It should reset proc->waitStart, not MyProc->waitStart.
>>
>> As written, it will incorrectly clear the caller’s waitStart instead of the awakened backend’s, potentially leaving a stale waitStart value in the target PGPROC.
Thanks for the report!
You’re right. This leaves proc->waitStart unreset for a backend that has
woken up from a lock wait. In practice this doesn't seem to cause
user-visible issues, since pg_locks.waitstart is reported as NULL
when pg_locks.granted is true, regardless of proc->waitStart.
That said, the behavior is incorrect, so I'm feeling inclined to backpatch
a fix. Thoughts?
> The fix looks correct to me. I applied it locally and build and "make check" passed from my side.
Sounds good to me.
Regards,
--
Fujii Masao
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Fix bug of clearing of waitStart in ProcWakeup()
2026-02-24 06:28 Fix bug of clearing of waitStart in ProcWakeup() Chao Li <li.evan.chao@gmail.com>
2026-02-24 07:31 ` Re: Fix bug of clearing of waitStart in ProcWakeup() ji xu <thanksgreed@gmail.com>
2026-02-24 15:41 ` Re: Fix bug of clearing of waitStart in ProcWakeup() Fujii Masao <masao.fujii@gmail.com>
@ 2026-02-24 22:03 ` Chao Li <li.evan.chao@gmail.com>
2026-02-26 00:08 ` Re: Fix bug of clearing of waitStart in ProcWakeup() Fujii Masao <masao.fujii@gmail.com>
0 siblings, 1 reply; 10+ messages in thread
From: Chao Li @ 2026-02-24 22:03 UTC (permalink / raw)
To: Fujii Masao <masao.fujii@gmail.com>; +Cc: ji xu <thanksgreed@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
> On Feb 24, 2026, at 23:41, Fujii Masao <masao.fujii@gmail.com> wrote:
>
> On Tue, Feb 24, 2026 at 4:31 PM ji xu <thanksgreed@gmail.com> wrote:
>>
>>
>> Chao Li <li.evan.chao@gmail.com> 于2026年2月24日周二 14:29写道:
>>>
>>> Since this function is clearly operating on the parameter proc, the only statement that touches MyProc looks suspicious. It should reset proc->waitStart, not MyProc->waitStart.
>>>
>>> As written, it will incorrectly clear the caller’s waitStart instead of the awakened backend’s, potentially leaving a stale waitStart value in the target PGPROC.
>
> Thanks for the report!
>
I just realized that I forgot to attach the patch file. Anyway, that’s just a one-line change.
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/
Attachments:
v1-0001-Fix-bug-of-clearing-of-waitStart-in-ProcWakeup.patch (application/octet-stream, 1.1K) download
From 5a741a41f675a8cff11cdbb20c819e4853ed1499 Mon Sep 17 00:00:00 2001
From: "Chao Li (Evan)" <lic@highgo.com>
Date: Tue, 24 Feb 2026 14:11:24 +0800
Subject: [PATCH v1] Fix bug of clearing of waitStart in ProcWakeup()
ProcWakeup() incorrectly resets MyProc->waitStart instead of the
waitStart field of the process being awakened.
Fix by resetting proc->waitStart, which corresponds to the PGPROC
being removed from the wait queue.
This looks like oversight of 46d6e5f.
Author: Chao Li <lic@highgo.com>
Reviewed-by:
Discussion: https://postgr.es/m/
---
src/backend/storage/lmgr/proc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index e2f34075d39..771b006b522 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -1715,7 +1715,7 @@ ProcWakeup(PGPROC *proc, ProcWaitStatus waitStatus)
proc->waitLock = NULL;
proc->waitProcLock = NULL;
proc->waitStatus = waitStatus;
- pg_atomic_write_u64(&MyProc->waitStart, 0);
+ pg_atomic_write_u64(&proc->waitStart, 0);
/* And awaken it */
SetLatch(&proc->procLatch);
--
2.50.1 (Apple Git-155)
=
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Fix bug of clearing of waitStart in ProcWakeup()
2026-02-24 06:28 Fix bug of clearing of waitStart in ProcWakeup() Chao Li <li.evan.chao@gmail.com>
2026-02-24 07:31 ` Re: Fix bug of clearing of waitStart in ProcWakeup() ji xu <thanksgreed@gmail.com>
2026-02-24 15:41 ` Re: Fix bug of clearing of waitStart in ProcWakeup() Fujii Masao <masao.fujii@gmail.com>
2026-02-24 22:03 ` Re: Fix bug of clearing of waitStart in ProcWakeup() Chao Li <li.evan.chao@gmail.com>
@ 2026-02-26 00:08 ` Fujii Masao <masao.fujii@gmail.com>
2026-02-26 01:04 ` Re: Fix bug of clearing of waitStart in ProcWakeup() Chao Li <li.evan.chao@gmail.com>
0 siblings, 1 reply; 10+ messages in thread
From: Fujii Masao @ 2026-02-26 00:08 UTC (permalink / raw)
To: Chao Li <li.evan.chao@gmail.com>; +Cc: ji xu <thanksgreed@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
On Wed, Feb 25, 2026 at 7:03 AM Chao Li <li.evan.chao@gmail.com> wrote:
>
>
>
> > On Feb 24, 2026, at 23:41, Fujii Masao <masao.fujii@gmail.com> wrote:
> >
> > On Tue, Feb 24, 2026 at 4:31 PM ji xu <thanksgreed@gmail.com> wrote:
> >>
> >>
> >> Chao Li <li.evan.chao@gmail.com> 于2026年2月24日周二 14:29写道:
> >>>
> >>> Since this function is clearly operating on the parameter proc, the only statement that touches MyProc looks suspicious. It should reset proc->waitStart, not MyProc->waitStart.
> >>>
> >>> As written, it will incorrectly clear the caller’s waitStart instead of the awakened backend’s, potentially leaving a stale waitStart value in the target PGPROC.
> >
> > Thanks for the report!
> >
>
> I just realized that I forgot to attach the patch file. Anyway, that’s just a one-line change.
I've pushed the patch. Thanks!
Regards,
--
Fujii Masao
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Fix bug of clearing of waitStart in ProcWakeup()
2026-02-24 06:28 Fix bug of clearing of waitStart in ProcWakeup() Chao Li <li.evan.chao@gmail.com>
2026-02-24 07:31 ` Re: Fix bug of clearing of waitStart in ProcWakeup() ji xu <thanksgreed@gmail.com>
2026-02-24 15:41 ` Re: Fix bug of clearing of waitStart in ProcWakeup() Fujii Masao <masao.fujii@gmail.com>
2026-02-24 22:03 ` Re: Fix bug of clearing of waitStart in ProcWakeup() Chao Li <li.evan.chao@gmail.com>
2026-02-26 00:08 ` Re: Fix bug of clearing of waitStart in ProcWakeup() Fujii Masao <masao.fujii@gmail.com>
@ 2026-02-26 01:04 ` Chao Li <li.evan.chao@gmail.com>
0 siblings, 0 replies; 10+ messages in thread
From: Chao Li @ 2026-02-26 01:04 UTC (permalink / raw)
To: Fujii Masao <masao.fujii@gmail.com>; +Cc: ji xu <thanksgreed@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
> On Feb 26, 2026, at 08:08, Fujii Masao <masao.fujii@gmail.com> wrote:
>
> On Wed, Feb 25, 2026 at 7:03 AM Chao Li <li.evan.chao@gmail.com> wrote:
>>
>>
>>
>>> On Feb 24, 2026, at 23:41, Fujii Masao <masao.fujii@gmail.com> wrote:
>>>
>>> On Tue, Feb 24, 2026 at 4:31 PM ji xu <thanksgreed@gmail.com> wrote:
>>>>
>>>>
>>>> Chao Li <li.evan.chao@gmail.com> 于2026年2月24日周二 14:29写道:
>>>>>
>>>>> Since this function is clearly operating on the parameter proc, the only statement that touches MyProc looks suspicious. It should reset proc->waitStart, not MyProc->waitStart.
>>>>>
>>>>> As written, it will incorrectly clear the caller’s waitStart instead of the awakened backend’s, potentially leaving a stale waitStart value in the target PGPROC.
>>>
>>> Thanks for the report!
>>>
>>
>> I just realized that I forgot to attach the patch file. Anyway, that’s just a one-line change.
>
> I've pushed the patch. Thanks!
>
> Regards,
>
> --
> Fujii Masao
Hi Fujii-san, thank you very much for taking care of this patch.
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Fix bug of clearing of waitStart in ProcWakeup()
2026-02-24 06:28 Fix bug of clearing of waitStart in ProcWakeup() Chao Li <li.evan.chao@gmail.com>
2026-02-24 07:31 ` Re: Fix bug of clearing of waitStart in ProcWakeup() ji xu <thanksgreed@gmail.com>
@ 2026-02-24 16:12 ` Álvaro Herrera <alvherre@kurilemu.de>
2026-02-24 16:37 ` Re: Fix bug of clearing of waitStart in ProcWakeup() Fujii Masao <masao.fujii@gmail.com>
1 sibling, 1 reply; 10+ messages in thread
From: Álvaro Herrera @ 2026-02-24 16:12 UTC (permalink / raw)
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>
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
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Fix bug of clearing of waitStart in ProcWakeup()
2026-02-24 06:28 Fix bug of clearing of waitStart in ProcWakeup() Chao Li <li.evan.chao@gmail.com>
2026-02-24 07:31 ` Re: Fix bug of clearing of waitStart in ProcWakeup() ji xu <thanksgreed@gmail.com>
2026-02-24 16:12 ` Re: Fix bug of clearing of waitStart in ProcWakeup() Álvaro Herrera <alvherre@kurilemu.de>
@ 2026-02-24 16:37 ` Fujii Masao <masao.fujii@gmail.com>
0 siblings, 0 replies; 10+ messages in thread
From: Fujii Masao @ 2026-02-24 16:37 UTC (permalink / raw)
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>
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
Attachments:
v1-0001-Fix-ProcWakeup-resetting-wrong-waitStart-field.patch (application/octet-stream, 1.6K) download
From dcfb39280a845513ece16f407405cdfa46d13d07 Mon Sep 17 00:00:00 2001
From: Fujii Masao <fujii@postgresql.org>
Date: Wed, 25 Feb 2026 00:42:06 +0900
Subject: [PATCH v1] Fix ProcWakeup() resetting wrong waitStart field.
Previously, when one process woke another that was waiting on a lock,
ProcWakeup() incorrectly cleared its own waitStart field (i.e.,
MyProc->waitStart) instead of that of the process being awakened.
As a result, the awakened process retained a stale lock-wait start timestamp.
This did not cause user-visible issues. pg_locks.waitstart was reported as
NULL for the awakened process (i.e., when pg_locks.granted is true),
regardless of the waitStart value.
This bug was introduced by commit 46d6e5f56790.
This commit fixes this by resetting the waitStart field of the process
being awakened in ProcWakeup().
Backpatch to all supported branches.
Reported-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: ji xu <thanksgreed@gmail.com>
Discussion: https://postgr.es/m/537BD852-EC61-4D25-AB55-BE8BE46D07D7@gmail.com
Backpatch-through: 14
---
src/backend/storage/lmgr/proc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index e2f34075d39..771b006b522 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -1715,7 +1715,7 @@ ProcWakeup(PGPROC *proc, ProcWaitStatus waitStatus)
proc->waitLock = NULL;
proc->waitProcLock = NULL;
proc->waitStatus = waitStatus;
- pg_atomic_write_u64(&MyProc->waitStart, 0);
+ pg_atomic_write_u64(&proc->waitStart, 0);
/* And awaken it */
SetLatch(&proc->procLatch);
--
2.51.2
^ permalink raw reply [nested|flat] 10+ messages in thread
end of thread, other threads:[~2026-02-26 01:04 UTC | newest]
Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-05-14 09:10 [PATCH v1] Log details for stats dropped more than once Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
2024-05-14 09:10 [PATCH v2] Log details for stats dropped more than once Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
2026-02-24 06:28 Fix bug of clearing of waitStart in ProcWakeup() Chao Li <li.evan.chao@gmail.com>
2026-02-24 07:31 ` Re: Fix bug of clearing of waitStart in ProcWakeup() ji xu <thanksgreed@gmail.com>
2026-02-24 15:41 ` Re: Fix bug of clearing of waitStart in ProcWakeup() Fujii Masao <masao.fujii@gmail.com>
2026-02-24 22:03 ` Re: Fix bug of clearing of waitStart in ProcWakeup() Chao Li <li.evan.chao@gmail.com>
2026-02-26 00:08 ` Re: Fix bug of clearing of waitStart in ProcWakeup() Fujii Masao <masao.fujii@gmail.com>
2026-02-26 01:04 ` Re: Fix bug of clearing of waitStart in ProcWakeup() Chao Li <li.evan.chao@gmail.com>
2026-02-24 16:12 ` Re: Fix bug of clearing of waitStart in ProcWakeup() Álvaro Herrera <alvherre@kurilemu.de>
2026-02-24 16:37 ` Re: Fix bug of clearing of waitStart in ProcWakeup() Fujii Masao <masao.fujii@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox