Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id A25E59FACFE for ; Thu, 1 Feb 2007 09:54:19 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 47446-03 for ; Thu, 1 Feb 2007 09:54:09 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.236]) by postgresql.org (Postfix) with ESMTP id 2DDC99FA399 for ; Thu, 1 Feb 2007 09:54:15 -0400 (AST) Received: by wr-out-0506.google.com with SMTP id i21so493656wra for ; Thu, 01 Feb 2007 05:54:12 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ffN2Ac4iZPTrAaJ+6Exstd0jBXQFnDVYJ2IdoqpUSpay+qfdbATEcsZgqdoxsZP3O/Cw6iuYEoZFkAqHySC+UdPtbDO7UZalPzJatKcz5Wv9mhodjWH/H9zcTdUME+c97AObZGjMKy31wVB+XZbq2n47SPfanBvBV6QhM9Iarks= Received: by 10.78.193.5 with SMTP id q5mr508502huf.1170338052055; Thu, 01 Feb 2007 05:54:12 -0800 (PST) Received: by 10.78.165.19 with HTTP; Thu, 1 Feb 2007 05:54:12 -0800 (PST) Message-ID: <36e682920702010554ld995211jba31cf3023592626@mail.gmail.com> Date: Thu, 1 Feb 2007 08:54:12 -0500 From: "Jonah H. Harris" To: "Achilleas Mantzios" Subject: Re: System Area Cc: pgsql-admin@postgresql.org In-Reply-To: <200702011423.56367.achill@matrix.gatewaynet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <45C1CAD8.8010207@yahoo.com.br> <200702011423.56367.achill@matrix.gatewaynet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/4 X-Sequence-Number: 24469 On 2/1/07, Achilleas Mantzios 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/