From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Reduce more the number of calls to GetMaxBackends()
Date: Thu, 10 Feb 2022 01:27:46 +0000
Message-ID: <E1nHyFO-0000XP-UX@gemulon.postgresql.org> (raw)
Reduce more the number of calls to GetMaxBackends()
Some of the code paths changed by aa64f23 can reduce the number of times
GetMaxBackends() is called. The performance gain is marginal, but most
of the code changed by this commit already did that. Hence, let's be
clean and apply the same rule everywhere, for consistency.
Some of the code paths, like in deadlock.c, involve only assertions.
These are left unchanged.
Reviewed-by: Nathan Bossart, Robert Haas
Discussion: https://postgr.es/m/YgMpGZhPOjNfS7er@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/4567596316d186c6e61c72df013797266fcac2f7
Modified Files
--------------
src/backend/commands/async.c | 5 +++--
src/backend/storage/lmgr/lock.c | 7 ++++---
src/backend/utils/adt/lockfuncs.c | 5 +++--
3 files changed, 10 insertions(+), 7 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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz
Subject: Re: pgsql: Reduce more the number of calls to GetMaxBackends()
In-Reply-To: <E1nHyFO-0000XP-UX@gemulon.postgresql.org>
References: <E1nHyFO-0000XP-UX@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