Rahila Syed <[email protected]> writes:
> Unrelated to the patch but I noticed a typo in the ERROR message in
> ResourceOwnerReleaseAllOfKind().
>> /* Mustn't call this after we have already started releasing resources. */
>> if (owner->releasing)
>> elog(ERROR, "ResourceOwnerForget called for %s after release started",
>> kind->name);
Hmm, that definitely looks like a message that was transposed from
someplace else without much thought. It might be worth tracing the
git history to see how it got to be like that.
More: unless I'm missing something, ResourceOwnerReleaseAllOfKind
is called only from plancache.c's ReleaseAllPlanCacheRefsInOwner,
which is called only in some very random-looking ways in plpgsql.
I wonder whether there's not a bigger cleanup project indicated here.
When I posted before, I thought that ResourceOwnerReleaseAllOfKind had
a direct lineage to the old ResourceOwner code, but now I'm thinking
maybe it shouldn't exist at all. Why should plpgsql be taking special
care for particular kinds of resource entries, and why should it
suppose that it owns all instances of that kind within that resowner?
regards, tom lane