X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2C0733B5006 for ; Thu, 23 Dec 2004 22:45:01 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 94480-08 for ; Thu, 23 Dec 2004 22:44:34 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id E4DD63B502B for ; Thu, 23 Dec 2004 22:44:35 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id iBNMiYhu002036; Thu, 23 Dec 2004 17:44:35 -0500 (EST) To: Pailloncy Jean-Gerard Cc: pgsql-performance@postgresql.org Subject: Re: Memory leak tsearch2 VACUUM FULL VERBOSE ANALYZE In-reply-to: <233CAA75-5473-11D9-9A44-000A95DE2550@rilk.com> References: <3D4B6E62-5055-11D9-96E2-000A95DE2550@ifrance.com> <24692.1103322047@sss.pgh.pa.us> <233CAA75-5473-11D9-9A44-000A95DE2550@rilk.com> Comments: In-reply-to Pailloncy Jean-Gerard message dated "Thu, 23 Dec 2004 00:42:27 +0100" Date: Thu, 23 Dec 2004 17:44:34 -0500 Message-ID: <2035.1103841874@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200412/284 X-Sequence-Number: 9659 Pailloncy Jean-Gerard writes: > I think I have a test case for 7.4.2 Try the attached patch. It looked to me like there were some smaller leaks going on during COPY and CREATE INDEX, which I will look into later --- but this seems to be the problem for VACUUM FULL. regards, tom lane Index: vacuum.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/commands/vacuum.c,v retrieving revision 1.263 diff -c -r1.263 vacuum.c *** vacuum.c 2 Oct 2003 23:19:44 -0000 1.263 --- vacuum.c 23 Dec 2004 22:37:57 -0000 *************** *** 2041,2046 **** --- 2041,2047 ---- ExecStoreTuple(&newtup, slot, InvalidBuffer, false); ExecInsertIndexTuples(slot, &(newtup.t_self), estate, true); + ResetPerTupleExprContext(estate); } WriteBuffer(cur_buffer); *************** *** 2174,2179 **** --- 2175,2181 ---- { ExecStoreTuple(&newtup, slot, InvalidBuffer, false); ExecInsertIndexTuples(slot, &(newtup.t_self), estate, true); + ResetPerTupleExprContext(estate); } } /* walk along page */