From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor PredicateLockShmemInit to not reuse var for different t
Date: Fri, 27 Mar 2026 11:47:59 +0000
Message-ID: <E1w65fS-001grb-28@gemulon.postgresql.org> (raw)
Refactor PredicateLockShmemInit to not reuse var for different things
The PredicateLockShmemInit function is pretty complicated, and one
source of confusion is that it reuses the same local variable for
sizes of things. Replace the different uses with separate variables
for clarity.
Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Discussion: https://www.postgresql.org/message-id/113724ab-0028-493f-9605-6e8570f0939f@iki.fi
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/3fd0577728277e66f072f3b07adf78299dfad7cc
Modified Files
--------------
src/backend/storage/lmgr/predicate.c | 68 +++++++++++++++++++-----------------
1 file changed, 35 insertions(+), 33 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: Refactor PredicateLockShmemInit to not reuse var for different t
In-Reply-To: <E1w65fS-001grb-28@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