Re: Theory question

From: Raghavendra <raghavendra(dot)rao(at)enterprisedb(dot)com>
To: Jayadevan M <maymala(dot)jayadevan(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Theory question
Date: 2013-11-12 08:13:38
Message-ID: CA+h6Ahhdgo1pQr1A+J21gBDHdpJk9h_OoVdaGxOOR_96saH=Pw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Nov 12, 2013 at 6:57 AM, Jayadevan M <maymala(dot)jayadevan(at)gmail(dot)com>wrote:

> Hi,
> What are the real differences between the bgwriter and checkpointer
> process? Both of them write data from the buffer to the data files, right?
> Is it just a matter of 'when' they write?
> Regards,
> Jayadevan
>

Expect some corrections
by others
on
my understanding
described below.

AFAIK, they share the load of writing dirty-buffers to disk, though they
are defined to serve different purpose. Basically, background writer
process sole function is to write "dirty" shared buffers to disk and evict
those pages from shared buffer pool. Whereas checkpoint, arrives to write
all dirty data pages in shared_buffers to disk only when checkpoint_timeout
or when all checkpoint_segments are filled, whichever comes first. However,
BG Writer (Writer Process) will be continuously
trickle out dirty pages to disk so that by the time checkpoint arrives
there will be left only with f
ew dirty pages, instead of
having
lots of dirty
pages

to carry out by i
tself
alone
and cause I/O loaded
.

---
Regards,
Raghavendra

In response to

Browse pgsql-general by date

  From Date Subject
Next Message dinesh kumar 2013-11-12 08:57:28 Re: Theory question
Previous Message Jeffrey Walton 2013-11-12 06:55:35 Re: Postgres 9.3.1 and Self Test Failure "pg_regress: no *.source files found"