Need help understanding WAL and checkpoints - Mailing list pgsql-general

From drew_hunt1976@yahoo.co.jp
Subject Need help understanding WAL and checkpoints
Date
Msg-id 864819.76832.qm@web4512.mail.ogk.yahoo.co.jp
Whole thread Raw
Responses Re: Need help understanding WAL and checkpoints  (Albe Laurenz <laurenz.albe@wien.gv.at>)
List pgsql-general
Hi there=0A=0AI'm trying to get my head around WAL and checkpoints and need=
 to ask a couple of questions before I get a headache.=0A=0AFirstly, I see =
the terms "WAL log", "WAL file" and "transaction log" all over the place - =
are these the same thing (i.e. files in the pg_xlog directory)?=0A=0AI'm a =
bit confused by this paragraph in the docs:=0A=0A"Checkpoints are points in=
 the sequence of transactions at which it is guaranteed that the heap and i=
ndex data files have been updated with all information written before the c=
heckpoint. At checkpoint time, all dirty data pages are flushed to disk and=
 a special checkpoint record is written to the log file. (The changes were =
previously flushed to the WAL files.)"=0A=0A( see: http://www.postgresql.or=
g/docs/current/static/wal-configuration.html )=0A=0A"a special checkpoint r=
ecord is written to the log file."=0A=A0=A0=A0 -> which log file is meant h=
ere?=0A=0A"The changes were previously flushed to the WAL files."=0A=A0=A0 =
-> does "previously" here mean "at a previous point in time" or "in previou=
s PostgreSQL versions"?=0A=0A=A0=A0 -> at what point are changes flushed to=
 WAL files?=0A=0ASo say I perform an operation like :=0A=0A=A0 UPDATE foo S=
ET bar=3D'baz'=0A=0Aare the following assumptions correct?=0A=0A- The first=
 time this changed data hits the disk, it is as an entry in the WAL log=0A=
=0A- At some point a checkpoint occurs, and the changed data is written to =
the actual data file from system memory (the "dirty data pages"?)=0A=0A- th=
e only time the actual data files will be updated from the WAL log (i.e. no=
t from system memory) will be after a crash, when the logs are replayed fro=
m the last checkpoint?=0A=0Athanks for any help on this!=0A=0A- drew

pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: "explain analyze" a procedure verbosely - to find which statement in it takes longer
Next
From: Bèrto ëd Sèra
Date:
Subject: Re: DEFERRABLE NOT NULL constraint