X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 085C730EE16 for ; Mon, 16 Jun 2003 21:34:41 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 55671-09 for ; Mon, 16 Jun 2003 18:34:30 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 60DC530E363 for ; Mon, 16 Jun 2003 18:34:30 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h5GLYTU6006893; Mon, 16 Jun 2003 17:34:29 -0400 (EDT) To: Dawn Hollingsworth Cc: pgsql-performance@postgresql.org Subject: Re: Postgres Connections Requiring Large Amounts of Memory In-reply-to: <1055753856.5467.57.camel@kaos> References: <1055752337.2182.49.camel@kaos> <6634.1055796302@sss.pgh.pa.us> <1055753856.5467.57.camel@kaos> Comments: In-reply-to Dawn Hollingsworth message dated "16 Jun 2003 08:57:35 -0000" Date: Mon, 16 Jun 2003 17:34:29 -0400 Message-ID: <6892.1055799269@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200306/101 X-Sequence-Number: 2185 Dawn Hollingsworth writes: > There are two things which might be considered off the beaten path > though: > 1. We have tables that have over 500 columns which we continually insert > into and select from. > 2. Our stored procedures take more than 16 parameters so in the file > config.h the value INDEX_MAX_KEYS was increased to 100. Neither of those raises a red flag with me. What would be useful to try to narrow things down is to look at the output of "MemoryContextStats(TopMemoryContext)" in a backend that's grown to a large size. This is a fairly primitive routine unfortunately; there is no built-in way to invoke it other than by calling it manually with a debugger, and it is only bright enough to write to stderr, not syslog. If you have stderr going somewhere useful (not /dev/null) and you built with debugging symbols, then you could attach to a running backend right now with gdb and get some useful info. If you don't have debugging symbols then you'll need to either rebuild with 'em, or create some other way to call the function. (There is a bit of stub code marked #ifdef SHOW_MEMORY_STATS in postgres.c that might be worth enabling, but I think it's only a sketch and won't compile as-is, since I don't see a ShowStats variable anywhere.) regards, tom lane