On Fri, Sep 25, 2015 at 8:51 AM, Marti Raudsepp <ma...@juffo.org> wrote: > I've also been seeing lots of log messages saying "LOG: out of > memory" on a server that's hosting development databases. I put off > debugging this until now because it didn't seem to have any adverse > effects on the system. > > The file on my system is currently 5.1GB (!). I don't know how it got > there -- under normal circumstances we don't have any enormous > queries, but perhaps our application bugs during development triggered > that.
It could be explained by legitimate errors during planning, for example. The query text is still stored. > So, as I understand it: if the system runs low on memory for an > extended period, and/or the file grows beyond 1GB (MaxAlloc), garbage > collection stops entirely, meaning it starts leaking disk space until > a manual intervention. I don't think that there is much more to discuss here: this is a bug. I will try and write a patch to fix it shortly. It will be non-trivial, and I'm quite busy right now, so it might take a while. A short-term remediation is to call pg_stat_statements_reset() on systems affected like this. -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers