From: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | shingav <shingav(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Understanding pg_xlog |
Date: | 2005-03-31 14:45:36 |
Message-ID: | 20050331144536.GA31118@dcc.uchile.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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[(at)]dcc(dot)uchile(dot)cl>)
"In a specialized industrial society, it would be a disaster
to have kids running around loose." (Paul Graham)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-03-31 14:59:55 | Re: Bug in DROP NOT NULL |
Previous Message | Qingqing Zhou | 2005-03-31 14:28:06 | Re: understanding pg_stat* numbers |