Loss of cache when persistent connexion is closed

Lists: pgsql-performance
From: "Guillaume Pungeot" <gpungeot(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Loss of cache when persistent connexion is closed
Date: 2008-01-08 15:35:56
Message-ID: 95c13b360801080735y181e4f5fs75c0741603f6021c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-performance

Hello,
I have a problem with my install of postgresql. I have a program that
requests DB by opening persistent connexions. When the program is launched,
the disk IO are very high until postgresql cache is good enough (a few
hours). The problem is that when I stop the program all the connexions are
closed and so are the postrgesql processes. And the cache is lost.
I really want to use postgresql but today I use mssqlserver and it never
lost its cache till I stop it (mssqlserver). So I don't have problem with
disk IO when the program is stopped an restarted.

I assume that each postgresql process manage its own cache but that there is
no global cache. Am I right ? If true is there any possibility to have a
global cache for all processes and is it possible not to free this cache
when connexions are closed ?

Regards

--
=========
Guillaume Pungeot - mappy


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Guillaume Pungeot" <gpungeot(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Loss of cache when persistent connexion is closed
Date: 2008-01-09 00:05:55
Message-ID: 22396.1199837155@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-performance

"Guillaume Pungeot" <gpungeot(at)gmail(dot)com> writes:
> I assume that each postgresql process manage its own cache but that there is
> no global cache. Am I right ?

No, you aren't.

Are you sure you're not shutting down the postmaster? Just exiting
individual sessions shouldn't result in anything getting discarded
from shared buffers.

regards, tom lane