Re: [GENERAL] plpyhton

From: Joshua Tolley <eggyknap(at)gmail(dot)com>
To: c k <shreeseva(dot)learning(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] plpyhton
Date: 2010-11-26 16:04:42
Message-ID: 4cefdab2.16958e0a.588d.ffff9748@mx.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Martin Gainty 2010-11-26 18:23:10 Re: plpyhton
Previous Message c k 2010-11-26 11:58:52 Re: [GENERAL] plpyhton

Browse pgsql-general by date

  From Date Subject
Next Message Martin Gainty 2010-11-26 18:23:10 Re: plpyhton
Previous Message Dmitriy Igrishin 2010-11-26 13:37:21 Terms advice.