Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Kohei KaiGai escribi�:
>> StartOneBackgroundWorker always scan the BackgroundWorkerList from
>> the head. Isn't it available to save the current position at static variable?
>> If someone tries to manage thousand of bgworkers, it makes a busy loop. :(
> Seems messy; we would have to get into the guts of slist_foreach (unroll
> the macro and make the iterator static). I prefer not to go that path,
> at least not for now.
Thousands of bgworkers seems like a pretty unsupportable scenario anyway
--- it'd presumably have most of the same problems as thousands of
backends.
regards, tom lane