From: Jonah H. Harris <jonah.harris@gmail.com>
To: Achilleas Mantzios <achill@matrix.gatewaynet.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: System Area
Date: Thu, 1 Feb 2007 08:54:12 -0500
Message-ID: <36e682920702010554ld995211jba31cf3023592626@mail.gmail.com> (raw)
In-Reply-To: <200702011423.56367.achill@matrix.gatewaynet.com>
References: <45C1CAD8.8010207@yahoo.com.br>
<200702011423.56367.achill@matrix.gatewaynet.com>
On 2/1/07, Achilleas Mantzios <achill@matrix.gatewaynet.com> wrote:
> > I would like to know if Postgres has shared memory like Library Cache
> > (avoid to do parse the same sql), Dictionary Cache (metadata
> > information), Sort Area and so on?
>
> Yes, PostgreSQL makes use of SYSV IPC shared mem and semaphores.
That's not the question that was asked though. The correct answer is
no, PostgreSQL does not have a global statement caching subsystem like
Oracle's Library Cache. The majority of PostgreSQL caches are
backend-local... which means that each backend maintains its own
cache. PostgreSQL has no algorithms similar to a hard, soft, or
soft-soft parse; it's all hard parsing in PostgreSQL unless you
explicitly prepare a statement.
Keep in mind that, once your session is terminated, so is all of your
cache data (including prepared statements). This isn't too much of an
issue on a connection-pooled system, but if you have lots of
client/server activity, you'll want to make sure you use prepared
statements.
> > Oracle has this structures. And Postgres?
> > I couldn't find anything about memory on Postgres.
PostgreSQL uses shared memory, but it's primarily for the buffer cache
and some shared variables.
--
Jonah H. Harris, Software Architect | phone: 732.331.1324
EnterpriseDB Corporation | fax: 732.331.1301
33 Wood Ave S, 3rd Floor | jharris@enterprisedb.com
Iselin, New Jersey 08830 | http://www.enterprisedb.com/
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: jonah.harris@gmail.com, achill@matrix.gatewaynet.com
Subject: Re: System Area
In-Reply-To: <36e682920702010554ld995211jba31cf3023592626@mail.gmail.com>
References: <45C1CAD8.8010207@yahoo.com.br> <200702011423.56367.achill@matrix.gatewaynet.com> <36e682920702010554ld995211jba31cf3023592626@mail.gmail.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