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 90EEE30F298 for ; Tue, 17 Jun 2003 23:05:28 +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 04996-02 for ; Tue, 17 Jun 2003 20:05:17 -0300 (ADT) Received: from smaug.securitymatrix.com (unknown [64.25.5.177]) by svr1.postgresql.org (Postfix) with ESMTP id 741F730F24E for ; Tue, 17 Jun 2003 20:05:17 -0300 (ADT) Received: from kaos.securitymatrix.com ([172.16.0.101]) by smaug.securitymatrix.com (8.11.6/8.11.6) with ESMTP id h5HN4YV23068; Tue, 17 Jun 2003 19:04:34 -0400 Subject: Re: Postgres Connections Requiring Large Amounts of Memory From: Dawn Hollingsworth To: Tom Lane Cc: pgsql-performance@postgresql.org, Ben Scherrey In-Reply-To: <15851.1055887425@sss.pgh.pa.us> References: <1055752337.2182.49.camel@kaos> <6634.1055796302@sss.pgh.pa.us> <1055753856.5467.57.camel@kaos> <6892.1055799269@sss.pgh.pa.us> <1055832411.5467.100.camel@kaos> <14875.1055878682@sss.pgh.pa.us> <1055842927.2182.227.camel@kaos> <15851.1055887425@sss.pgh.pa.us> Content-Type: multipart/alternative; boundary="=-FByJ//kcAEeLmRItyUAL" X-Mailer: Ximian Evolution 1.0.8 Date: 17 Jun 2003 11:03:28 +0000 Message-Id: <1055847810.2833.260.camel@kaos> Mime-Version: 1.0 X-Archive-Number: 200306/119 X-Sequence-Number: 2203 --=-FByJ//kcAEeLmRItyUAL Content-Type: text/plain Content-Transfer-Encoding: 7bit Each stored procedure only updates one row and inserts one row. I just connected the user interface to the database. It only does selects on startup. It's connection jumped to a memory usage of 256M. It's not getting any larger but it's not getting any smaller either. I'm going to compile postgres with the SHOW_MEMORY_STATS. I'm assuming I can just set ShowStats equal to 1. I'll also pare down the application to only use one of the stored procedures for less noise and maybe I can track where memory might be going. And in the meantime I'll get a test going with Postgres 7.3 to see if I get the same behavior. Any other suggestions? -Dawn On Tue, 2003-06-17 at 22:03, Tom Lane wrote: > The only theory I can come up with is that the deferred trigger list is > getting out of hand. Since you have foreign keys in all the tables, > each insert or update is going to add a trigger event to the list of > stuff to check at commit. The event entries aren't real large but they > could add up if you insert or update a lot of stuff in a single > transaction. How many rows do you process per transaction? > > regards, tom lane --=-FByJ//kcAEeLmRItyUAL Content-Type: text/html; charset=utf-8
Each stored procedure only updates one row and inserts one row.

I just connected the user interface to the database. It only does selects on startup. It's connection jumped to a memory usage of 256M.  It's not getting any larger but it's not getting any smaller either.

I'm going to compile postgres with the SHOW_MEMORY_STATS. I'm assuming I can just set ShowStats equal to 1. I'll also pare down the application to only use one of the stored procedures for less noise and maybe I can track where memory might be going. And in the meantime I'll get a test going with Postgres 7.3 to see if I get the same behavior.

Any other suggestions?

-Dawn

On Tue, 2003-06-17 at 22:03, Tom Lane wrote:
> The only theory I can come up with is that the deferred trigger list is
> getting out of hand.  Since you have foreign keys in all the tables,
> each insert or update is going to add a trigger event to the list of
> stuff to check at commit.  The event entries aren't real large but they
> could add up if you insert or update a lot of stuff in a single
> transaction.  How many rows do you process per transaction?
> 
> 			regards, tom lane

--=-FByJ//kcAEeLmRItyUAL--