[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: [HACKERS] Understanding pg_xlog
From:       Alvaro Herrera <alvherre () dcc ! uchile ! cl>
Date:       2005-03-31 14:45:36
Message-ID: 20050331144536.GA31118 () dcc ! uchile ! cl
[Download RAW message or body]

On Thu, Mar 31, 2005 at 12:37:22PM +0100, Simon Riggs wrote:
> On Thu, 2005-03-31 at 13:35 +0530, shingav wrote:

> > 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.
> 
> Changes made are stored in the xlog, typically changes to data blocks.
> The record types show which types of change have been made. Each part of
> the system that can write to the database also has a mechanism for
> replaying those changes. For example, the REDO for a CREATE DATABASE is
> quite different from the REDO for an INSERT into a table (heap). There
> are a few actions which are not logged and these are documented.

I think you can define a XLOG_DEBUG flag (or WAL_DEBUG, I don't
remember) and with a little more twiddling you can have postmaster print
the entries in readable form as they are produced.  That may serve as a
starting point for understanding what is logged.

-- 
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"In a specialized industrial society, it would be a disaster
to have kids running around loose." (Paul Graham)

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic