Re: hyrax vs. RelationBuildPartitionDesc - Mailing list pgsql-hackers

From Tom Lane
Subject Re: hyrax vs. RelationBuildPartitionDesc
Date
Msg-id 3969.1552581380@sss.pgh.pa.us
Whole thread Raw
In response to Re: hyrax vs. RelationBuildPartitionDesc  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: hyrax vs. RelationBuildPartitionDesc
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I did not back-patch, because the code is in a different file in v11,
> none of the hunks of the patch apply on v11, and v11 is not failing on
> hyrax.

Hmm, I wonder why not.  I suppose the answer is that
the leak is worse in HEAD than before, but how come?

I followed your reference to 898e5e329, and I've got to say that
the hunk it adds in relcache.c looks fishy as can be.  The argument
that the rd_pdcxt "will get cleaned up eventually" reads to me like
"this leaks memory like a sieve", especially in the repeated-rebuild
scenario which is exactly what CLOBBER_CACHE_ALWAYS would provoke.
Probably the only thing that keeps it from being effectively a
session-lifespan leak is that CCA will generally result in relcache
entries being flushed entirely as soon as their refcount goes to 0.
Still, because of that, I wouldn't think it'd move the needle very
much on a CCA animal; so my guess is that there's something else.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: hyrax vs. RelationBuildPartitionDesc
Next
From: Tom Lane
Date:
Subject: Re: why doesn't DestroyPartitionDirectory hash_destroy?