public inbox for [email protected]  
help / color / mirror / Atom feed
From: [email protected] <[email protected]>
To: Bossart, Nathan <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: Bharath Rupireddy <[email protected]>
Cc: Greg Sabino Mullane <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: [email protected] <[email protected]>
Subject: RE: make MaxBackends available in _PG_init
Date: Sun, 15 Aug 2021 08:04:38 +0000
Message-ID: <OSBPR01MB42140A01E3441C576539AF38F2FC9@OSBPR01MB4214.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <CAKAnmmJ_3HQZ7PvpiJoJKYfffp8GOUXE3BVHsD9EOjDrcrU1FA@mail.gmail.com>
References: <4f20d57b2aeb447b8eb1495319940c5f@G08CNEXMBPEKD06.g08.fujitsu.local>
	<CALj2ACUHruScDf2dvnVso03bhSdr7MVvLie5C8ND1dR+hJrFEg@mail.gmail.com>
	<[email protected]>
	<CA+TgmoYKBMdizs7-NBrhLHJXCv4dAAmBKHvER0PDmV+rBCy7KA@mail.gmail.com>
	<[email protected]>
	<CA+TgmoaaF46+A_Y-DTxDJpPGcqKxJU=ZPzFisqqouRL_WxYBSQ@mail.gmail.com>
	<[email protected]>
	<CAKAnmm+o5-ROvnghC-79=1Jr4bqJxmyu98Qax=KSukdL6JZm0g@mail.gmail.com>
	<[email protected]>
	<CAKAnmmJsHnNc65aLQErabTdcF=B+bMfSnLNUezC7nnsMb8bCDg@mail.gmail.com>
	<[email protected]>
	<CAKAnmmJ_3HQZ7PvpiJoJKYfffp8GOUXE3BVHsD9EOjDrcrU1FA@mail.gmail.com>

Hi,

I noticed that in v3-0001-Disallow-external-access-to-MaxBackends.patch, there are some modifications like:

> -		for (int i = 0; i <= MaxBackends; i++)
> +		for (int i = 0; i <= GetMaxBackends(); i++)

I don't think calling function GetMaxBackends() in the for loop is a good idea.  
How about use a temp variable to save the return value of function GetMaxBackends() ?

Regards,
Shenhao Wang


view thread (67+ messages)  latest in thread

reply

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: RE: make MaxBackends available in _PG_init
  In-Reply-To: <OSBPR01MB42140A01E3441C576539AF38F2FC9@OSBPR01MB4214.jpnprd01.prod.outlook.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox