pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joshua Tolley <eggyknap@gmail.com>
To: c k <shreeseva.learning@gmail.com>
Cc: pgsql-admin@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] plpyhton
Date: Fri, 26 Nov 2010 09:04:42 -0700
Message-ID: <4cefdab2.16958e0a.588d.ffff9748@mx.google.com> (raw)
In-Reply-To: <AANLkTimOyJxKFnZdv30xGdu_GZce6riZxARsEi8dFQSx@mail.gmail.com>
References: <AANLkTimo61d+_oEaX_3S=Lby=YJGP=ca0UC3XEFyfVNk@mail.gmail.com>
	<AANLkTikk1YBMFwiVg8UvX1vEmC0yxqYpO0z-H=8dyNxX@mail.gmail.com>
	<4cedf777.2a978e0a.619c.164d@mx.google.com>
	<AANLkTimOyJxKFnZdv30xGdu_GZce6riZxARsEi8dFQSx@mail.gmail.com>

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

Attachments:

  signature.asc (application/pgp-signature, 196B) download

view thread (9+ messages)  latest in thread

Message-ID: <4cefdab2.16958e0a.588d.ffff9748@mx.google.com>
Permalink:  ../4cefdab2.16958e0a.588d.ffff9748@mx.google.com/
Also on:    postgresql.org/message-id/4cefdab2.16958e0a.588d.ffff9748@mx.google.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: eggyknap@gmail.com, shreeseva.learning@gmail.com, pgsql-general@postgresql.org
  Subject: Re: [GENERAL] plpyhton
  In-Reply-To: <4cefdab2.16958e0a.588d.ffff9748@mx.google.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox