Skip site navigation (1) Skip section navigation (2)

WAL files and heckpoints

From: Julio Leyva <jcleyva(at)hotmail(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: WAL files and heckpoints
Date: 2008-01-29 01:26:12
Message-ID: BLU102-W54713C56214E6E10A69A92A1350@phx.gbl (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
Hi all

We have been 'fighting' with the performance of our app for some days now.We don't know exactly how wal log files and check points exactly work behind scenes.
We found that incrementing the checkpoint_segments and increasing the wal_buffers the performance of our app goes up.
Our app is primarily  inserts , we don't do deletes at all and updates happen just eventually.
We have two understanding on this 

1 )So once a transaction is comitted , it goes to the wal_buffers then when a checkpoint_segment comes or a time_out comes , wal_buffers is flush out to the disk into the logfiles?
Is that correct?, If so, what happens if the system crash before a checkpoint occurs? we lost the log files?.

2) Transactions go to the WAL buffers then when the check_point comes , wal_buffers are written to the D.B. and to the logfiles
if so what happen when the system crash before the wal_buffers are written do the D.B/

Could u please clarify that process?

Thanks a lot in advance

pgsql-admin by date

Next:From: dx k9Date: 2008-01-29 01:47:02
Subject: Re: Zen and art if WAL and dump file mainteance
Previous:From: Michael MonnerieDate: 2008-01-29 00:15:43
Subject: Re: Syslog to postgresql - need peaks of 5.000/s

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group