Robert Haas <robertmh...@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