Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id C353D2E00D3 for ; Fri, 22 Feb 2008 10:54:22 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 84850-08 for ; Fri, 22 Feb 2008 10:54:19 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 9DB502E00F1 for ; Fri, 22 Feb 2008 10:54:19 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m1MEsFPn003217; Fri, 22 Feb 2008 09:54:15 -0500 (EST) To: "Dawid Kuroczko" cc: "pgsql-admin@postgresql.org" Subject: Re: PL/pgSQL memory consumption? In-reply-to: <758d5e7f0802220523x12a444ap679e51b990190ccc@mail.gmail.com> References: <758d5e7f0802220523x12a444ap679e51b990190ccc@mail.gmail.com> Comments: In-reply-to "Dawid Kuroczko" message dated "Fri, 22 Feb 2008 14:23:42 +0100" Date: Fri, 22 Feb 2008 09:54:15 -0500 Message-ID: <3216.1203692055@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/275 X-Sequence-Number: 28349 "Dawid Kuroczko" writes: > I have recently found a nice utility called memstat (which shows how > much of private > (not shared)) memory each process uses. What kind of surprised me was > the amount > of memory that is used by PL/pgSQL (one more reason not to provide it > by default? ;-)). Why should we put any credence whatsoever in these numbers? I rather doubt that "memstat" knows anything about our palloc mechanism, so I don't see how it could possibly give reliable answers about how much memory one portion or another of Postgres is using. Having said that, it would be interesting to know exactly what it *is* measuring. regards, tom lane