Re: HaveNFreeProcs() iterates through entire freeProcs list

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: HaveNFreeProcs() iterates through entire freeProcs list
Date: 2016-12-02 20:52:57
Message-ID: 19611.1480711977@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-12-02 21:07:46 Re: [COMMITTERS] pgsql: Add max_parallel_workers GUC.
Previous Message Heikki Linnakangas 2016-12-02 20:49:52 Re: Radix tree for character conversion