On 2019-Feb-23, Tom Lane wrote:
> However, if someone held a gun to my head and said fix it, I'd be inclined
> to do so by having temp-namespace creation insert a "pin" dependency into
> pg_depend. Arguably, the only reason we don't create all the temp
> namespaces during bootstrap is because we aren't sure how many we'd need
> --- but if we did do that, they'd presumably end up pinned.
Is there a problem if we start with very high max_backends and this pins
a few thousands schemas that are later no longer needed? There's no
decent way to drop them ... (I'm not sure it matters all that much,
except for bloat in pg_namespace.)
How about hardcoding a pin for any schema that's within the current
max_backends?
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services