Re: HaveNFreeProcs() iterates through entire freeProcs list - Mailing list pgsql-hackers

From Tom Lane
Subject Re: HaveNFreeProcs() iterates through entire freeProcs list
Date
Msg-id 19611.1480711977@sss.pgh.pa.us
Whole thread Raw
In response to HaveNFreeProcs() iterates through entire freeProcs list  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Responses Re: HaveNFreeProcs() iterates through entire freeProcs list  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-hackers
Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
> Current HaveNFreeProcs() iterates through the entire freeProcs list 
> (while holding ProcStructLock) just to determine if there's a small 
> number (superuser_reserved_connections) of free slots available.

I think you misread it.  Note the "n > 0" part of the while condition.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Radix tree for character conversion
Next
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Add max_parallel_workers GUC.