pgsql: Rework locking code in GetMultiXactIdMembers

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Rework locking code in GetMultiXactIdMembers
Date: 2024-03-04 16:51:43
Message-ID: E1rhBXT-0023rL-5D@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Rework locking code in GetMultiXactIdMembers

After commit 53c2a97a9266, the code flow around the "retry" goto label
in GetMultiXactIdMembers was confused about what was possible: we never
return there with a held lock, so there's no point in testing for one.
This realization lets us simplify the code a bit. While at it, make the
scope of a couple of local variables in the same function a bit tighter.

Per Coverity.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a0b808baef39e9f9465b7f63f2d735f35852aa21

Modified Files
--------------
src/backend/access/transam/multixact.c | 53 ++++++++++++++--------------------
1 file changed, 22 insertions(+), 31 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2024-03-04 17:01:00 pgsql: Fix initdb's -c option to treat the GUC name case-insensitively.
Previous Message Alvaro Herrera 2024-03-04 16:38:29 pgsql: Simplify coding in slru.c