Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 572089FB31C for ; Wed, 4 Oct 2006 10:52:35 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 02589-07 for ; Wed, 4 Oct 2006 10:52:30 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.libertyrms.com (vgateway.libertyrms.info [207.219.45.62]) by postgresql.org (Postfix) with ESMTP id CF7459FB36F for ; Wed, 4 Oct 2006 10:52:29 -0300 (ADT) Received: from dba5.int.libertyrms.com ([10.1.3.44]) by mail.libertyrms.com with esmtp (Exim 4.22) id 1GV7Ah-0002eH-2Z; Wed, 04 Oct 2006 09:52:27 -0400 Subject: Re: PostgreSQL Caching From: Brad Nicholson To: "Tomeh, Husam" Cc: Adnan DURSUN , pgsql-performance@postgresql.org In-Reply-To: References: Content-Type: text/plain Date: Wed, 04 Oct 2006 09:52:26 -0400 Message-Id: <1159969946.15773.23.camel@dba5.int.libertyrms.com> Mime-Version: 1.0 X-Mailer: Evolution 2.6.2 (2.6.2-1.fc5.5) Content-Transfer-Encoding: 7bit X-SA-Exim-Mail-From: bnichols@ca.afilias.info X-SA-Exim-Scanned: No; SAEximRunCond expanded to false X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.247 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/85 X-Sequence-Number: 21214 On Tue, 2006-10-03 at 18:29 -0700, Tomeh, Husam wrote: > >> * When any session updates the data that already in shared > buffer, > >>does Postgres synchronize the data both disk and shared buffers area > >> immediately ? > > Not necessarily true. When a block is modified in the shared buffers, > the modified block is written to the Postgres WAL log. A periodic DB > checkpoint is performed to flush the modified blocks in the shared > buffers to the data files. Postgres 8.0 and beyond have a process called bgwriter that continually flushes dirty buffers to disk, to minimize the work that needs to be done at checkpoint time.