From: | didier <did447(at)gmail(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Properly initialize negative/empty cache entries in relfilenodemap |
Date: | 2013-08-30 00:05:13 |
Message-ID: | CAJRYxuKVt+acXpxFNZ0NkgWJTZ36GmcLSbvVWuft24vZuvvCsA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On Thu, Aug 29, 2013 at 2:35 PM, MauMau <maumau307(at)gmail(dot)com> wrote:
>
> Great! Could anybody find the root cause for the following memory leak
> problem, and if possible, fix this?
>
> http://www.postgresql.org/**message-id/**214653D8DF574BFEAA6ED53E545E99**
> E4(at)maumau<http://www.postgresql.org/message-id/214653D8DF574BFEAA6ED53E545E99E4@maumau>
>
> Heiki helped to solve this and found that pg_statistic entries are left in
> CacheMemoryContext, but we have no idea where and how they are created and
> left. This seems difficult to me.
>
> VALGRIND won't help you for this one
You hit 2 issues
- user can create negative cache entries in pg_statistic with SELECT but
they are unbound (at first there was a LRU aging but it was removed in 2006)
- if there's no row in pg_statistic for a relation/column then
RemoveStatistics, called by DROP ..., doesn't invalidate the cache (which
should remove these negative entries).
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2013-08-30 00:07:23 | Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review]) |
Previous Message | Andres Freund | 2013-08-30 00:02:43 | Re: WAL CPU overhead/optimization (was Master-slave visibility order) |