Re: make MaxBackends available in _PG_init - Mailing list pgsql-hackers

From Bossart, Nathan
Subject Re: make MaxBackends available in _PG_init
Date
Msg-id B7E20C65-D0AB-47B2-BC43-A831601711A2@amazon.com
Whole thread Raw
In response to RE: make MaxBackends available in _PG_init  ("wangsh.fnst@fujitsu.com" <wangsh.fnst@fujitsu.com>)
Responses Re: make MaxBackends available in _PG_init  (Fujii Masao <masao.fujii@oss.nttdata.com>)
List pgsql-hackers
On 8/15/21, 1:05 AM, "wangsh.fnst@fujitsu.com" <wangsh.fnst@fujitsu.com> wrote:
> 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() ?

I did this in v4.  There may be a couple of remaining places that call
GetMaxBackends() several times, but the function should be relatively
inexpensive.

Nathan


Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Failure of subscription tests with topminnow
Next
From: Soumyadeep Chakraborty
Date:
Subject: Re: Changes to recovery_min_apply_delay are ignored while waiting for delay