Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 27EAD1337B4A for ; Fri, 26 Nov 2010 12:05:23 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 30597-07; Fri, 26 Nov 2010 16:05:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pz0-f46.google.com (mail-pz0-f46.google.com [209.85.210.46]) by mail.postgresql.org (Postfix) with ESMTP id 9BF6C1337B43; Fri, 26 Nov 2010 12:05:10 -0400 (AST) Received: by pzk6 with SMTP id 6so352649pzk.19 for ; Fri, 26 Nov 2010 08:05:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:cc :subject:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=A4u+LmL7g/Qu7pcQRMnZthjTPNLhoCMMbVVjdXKoj3g=; b=JMSWkxM1ZxFaVhq20BtfbIG1BSalVJziE/xHwSz3TZnqj4RlyQisTS0qNjln7ntKEm nzr576ub5DJZG+k95ujCwteQptJ6/ADsnM1FPXipK0cEbagspWUW0faxMkM4jY32Tx8q zpj2zRMxt5UWXLzbeseg7oF9zcwkSzKqosL7Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:cc:subject:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=uZH+UkXGMKIZLTh20i059M6uD2q8OOyOASk0XVrjbPYnlIHjSOGyNxDtWQ9CW+04Lq KCuy4Am6e3tn+snKf4plMGoFv4eatzkazkuW9lcQWO1GL0FDWTyHuZNltdMOVIMoqQyo p9K4XWqTRAEVLUK9dIKum9ok2dX55zO1g0zl0= Received: by 10.142.233.2 with SMTP id f2mr2533329wfh.395.1290787509712; Fri, 26 Nov 2010 08:05:09 -0800 (PST) Received: from eddie (c-67-186-249-122.hsd1.ut.comcast.net [67.186.249.122]) by mx.google.com with ESMTPS id w22sm2706518wfd.19.2010.11.26.08.05.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 26 Nov 2010 08:05:06 -0800 (PST) Message-ID: <4cefdab2.16958e0a.588d.ffff9748@mx.google.com> Date: Fri, 26 Nov 2010 09:04:42 -0700 From: Joshua Tolley To: c k Cc: pgsql-admin@postgresql.org, pgsql-general@postgresql.org Subject: Re: [GENERAL] plpyhton References: <4cedf777.2a978e0a.619c.164d@mx.google.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VSVNCtZB1QZ8vhj+" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201011/229 X-Sequence-Number: 36195 --VSVNCtZB1QZ8vhj+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Nov 26, 2010 at 05:28:52PM +0530, c k wrote: > Thanks for your reply. > But if a database has 100+ connections then isn't loading any such > interpreter consumes more memory and requires more CPU? Does all PL > languages behave in the same fashion? If there are lots of connections, and each calls a plpython function (for example), then each will load a python interpreter, and certainly that could add up to serious memory usage. I can't speak for *every* PL; C functions don't load any special interpreter, for instance, and I don't think there's anything special you have to load to run SQL functions, beyond what gets loaded anyway. If you have problems with hundreds of connections using too much memory when each loads an interpreter, you ought to consider getting more memory, using a connection pooler, changing how you do things, or some combination of the above. -- Joshua Tolley / eggyknap End Point Corporation http://www.endpoint.com --VSVNCtZB1QZ8vhj+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkzv2poACgkQRiRfCGf1UMPKcgCeJmlIXhuiaSHec+QfJuCGSXPN hwwAn2HPhhHLs3zMP9sm6kINeQQe7VkL =S71u -----END PGP SIGNATURE----- --VSVNCtZB1QZ8vhj+--