Re: odd iostat graph - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: odd iostat graph
Date
Msg-id 4AAA4F0D020000250002AD0C@gw.wicourts.gov
Whole thread Raw
In response to Re: odd iostat graph  (Alan McKay <alan.mckay@gmail.com>)
List pgsql-performance
Alan McKay <alan.mckay@gmail.com> wrote:

>>  My guess is this is checkpoint related.
>
> I'll assume "checkpoint" is a PG term that I'm not yet familiar with
-
> will query my DBA :-)

A checkpoint flushes all dirty PostgreSQL buffers to the OS and then
tells the OS to write them to disk.  The exact details of how that's
done and the timings involved vary with PostgreSQL version and
configuration.

> If this OS buffer cache, wouldn't that be cached an awfully long
> time?  i.e. we're in big trouble if we get a bad crash?

Before the commit of a database transaction is completed the changes
which are involved in that are written to a write ahead log (WAL).  A
checkpoint is also recorded in the WAL.  On recovery from a crash,
PostgreSQL replays all activity from committed transactions after the
last checkpoint; so nothing from a committed transaction is lost.

-Kevin

pgsql-performance by date:

Previous
From: Alan McKay
Date:
Subject: Re: odd iostat graph
Next
From: Jason Tesser
Date:
Subject: Re: View vs Stored Proc Performance