Understanding pg_xlog - Mailing list pgsql-hackers

From shingav
Subject Understanding pg_xlog
Date
Msg-id 3846dd305033100051a5ae6e3@mail.gmail.com
Whole thread Raw
Responses Re: Understanding pg_xlog
List pgsql-hackers
Hello,

I am trying to understand the way in which PostgreSQL creates, updates
and uses the transaction log.

I browsed through the sources and what I understand is that, when we
"initdb", the "initdb" binary reads postgres.bki which is created by
genbki.sh.

But I fail to understand how data is stored (written) in the
"000001xxxxx" file. I came across some CRC and compression code.

I used a hexeditor to deciphar the contents of "000001xxxx" file but
it was not of much help.

Are the query (inserts/updates) put as is in the transaction log file ?

Does the CRC and compression logic transform the query ?

While we do a recovery, does it backtrace these CRC and compression
logic to retrieve the query ?

Thanks,
Shinga


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: HEAD \df doesn't show functions with no arguments
Next
From: Marian POPESCU
Date:
Subject: Re: ARC patent