PostgreSQL: Checkpoints

First we need to look at how PostgreSQL write data.

INSERT INTO table(column)
VALUES (value)

The value will be sent to WAL first. Then PostgreSQL will take it to Shared Buffer. BgWriter come to take the value, and write to correspondent location.

Because PostgreSQL could crash any time.