You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve buffer manager API for backend pin limits.
Previously the support functions assumed that the caller needed one pin
to make progress, and could optionally use some more. Add a couple more
functions for callers that want to know:
* what the maximum possible number could be irrespective of currently
held pins, for space planning purposes, called the "soft pin limit"
* how many additional pins they could acquire right now, without the
special case allowing one pin, for users that already hold pins and
could make progress even if zero extra pins are available
These APIs are better suited to read_stream.c, which will be improved in
a follow-up patch. Also compute MaxProportionalPins up front, to avoid
performing division whenever we check the balance.
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CA%2BhUKGK_%3D4CVmMHvsHjOVrK6t4F%3DLBpFzsrr3R%2BaJYN8kcTfWg%40mail.gmail.com
0 commit comments