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 D5D39D1B557 for ; Mon, 7 Jun 2004 12:11:32 -0300 (ADT) 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 49626-02 for ; Mon, 7 Jun 2004 15:11:25 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id D60BED1B1DC for ; Mon, 7 Jun 2004 12:11:23 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i57FBLKH003530; Mon, 7 Jun 2004 11:11:21 -0400 (EDT) To: Stef Cc: pgsql-performance@postgresql.org Subject: Re: Postgres function use makes machine crash. In-reply-to: <20040607133415.09a2ce2f@svb.ucs.co.za> References: <20040607133415.09a2ce2f@svb.ucs.co.za> Comments: In-reply-to Stef message dated "Mon, 07 Jun 2004 13:34:15 +0200" Date: Mon, 07 Jun 2004 11:11:21 -0400 Message-ID: <3529.1086621081@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/60 X-Sequence-Number: 7118 Stef writes: > I've been dealing with a problem for the past two days > where a certain sql statement works 2 out of 5 times, and > the other 3 times, it causes the machine (quad Xeon 2.8GHz > + 792543232 bytes mem, linux kernel 2.4.26-custom, pg ver 7.3.4) > to slow down, and finally grind to a halt. IIRC, PG prior to 7.4 had some problems with memory leaks in repeated execution of SQL-language functions ... and your query sure looks like it's going to be doing a lot of repeated execution of those functions. Please try it on 7.4.2 and see if you still have a problem. It seems somewhat interesting that you see the problem only sometimes and not every time, but there's not much point in investigating further if it turns out the problem is already fixed. regards, tom lane