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

Re: Understanding pg_xlog

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: (view raw, whole thread or download thread mbox)
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)

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-03-31 14:59:55
Subject: Re: Bug in DROP NOT NULL
Previous:From: Qingqing ZhouDate: 2005-03-31 14:28:06
Subject: Re: understanding pg_stat* numbers

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