From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Set MyProc->heldLocks in ProcSleep
Date: Mon, 04 Nov 2024 14:21:50 +0000
Message-ID: <E1t7xxm-0008wD-Di@gemulon.postgresql.org> (raw)
Set MyProc->heldLocks in ProcSleep
Previously, ProcSleep()'s caller was responsible for setting
MyProc->heldLocks, and we had comments to remind about that. But it
seems simpler to make ProcSleep() itself responsible for it.
ProcSleep() already set the other info about the lock its waiting for
(waitLock, waitProcLock and waitLockMode), so it is natural for it to
set heldLocks too.
Reviewed-by: Maxim Orlov
Discussion: https://www.postgresql.org/message-id/7c2090cd-a72a-4e34-afaa-6dd2ef31440e@iki.fi
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/0464f25b6aa156228982efd46303e8c8dd25cccc
Modified Files
--------------
src/backend/storage/lmgr/lock.c | 8 --------
src/backend/storage/lmgr/proc.c | 11 +++++++----
2 files changed, 7 insertions(+), 12 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: heikki.linnakangas@iki.fi, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Set MyProc->heldLocks in ProcSleep
In-Reply-To: <E1t7xxm-0008wD-Di@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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