Re: Tools for dumping pg_xlog, pg_clog, etc?

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: Gerhard Wiesinger <lists(at)wiesinger(dot)com>
Subject: Re: Tools for dumping pg_xlog, pg_clog, etc?
Date: 2007-11-30 06:56:13
Message-ID: 200711300156.14001.xzilla@users.sourceforge.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Monday 26 November 2007 01:23, Gerhard Wiesinger wrote:
> Hello!
>
> Since the pg_filedump utility manages only the database file I'm currently
> writing a pg_xlog/pg_clog viewer.
>
> I'm looking for the documentation in:
> // See src/include/access/xlog.h
> // See src/include/access/xlog_internal.h
> // See src/include/access/xlogdefs.h
> // See src/backend/access/transam/xlog.c
>
> // See src/include/access/clog.h
> // See src/backend/access/transam/clog.c
>
> // See src/include/access/rmgr.h
> // See src/backend/access/transam/rmgr.c
>
> But I'm still having problems to get a suitable output:
> 1.) pg_xlog:
> a.) Reading XLogPageHeaderData or XLogLongPageHeaderData works well
> b.) Afterwards a XLogRecord should be expected but the output doesn't look
> suitable (e.g. CRC has 000000 in it in different files which is not
> suitable)
> I'll expect in b.):
> * The overall layout of an XLOG record is:
> * Fixed-size header (XLogRecord struct)
> * rmgr-specific data
> * BkpBlock
> * backup block data
> * BkpBlock
> * backup block data
> * ...
>
> Any ideas of the correct structure?
>
>
> 2.) pg_clog:
> I'm not sure what the correct structures of pg_clog are.
> Any ideas?
>
> Thnx.
>
> Ciao,
> Gerhard
>
> --
> http://www.wiesinger.com/
>
> On Sat, 26 May 2007, Gerhard Wiesinger wrote:
> > Hello!
> >
> > I think I found a proper utility for that: pg_filedump
> > http://sources.redhat.com/rhdb/utilities.html
> >
> > Ciao,
> > Gerhard
> >
> > --
> > http://www.wiesinger.com/
> >
> > On Fri, 18 May 2007, Gerhard Wiesinger wrote:
> >> Hello!
> >>
> >> Are there any tools available to dump the files of the pg_xlog, pg_clog,
> >> ... directories in human readable format to understand how transaction
> >> handling is done?
> >>

Have you looked at http://pgfoundry.org/projects/xlogviewer/ ?

--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Robert Treat 2007-11-30 06:59:40 Re: PostgresSQL vs Ingress
Previous Message Greg Smith 2007-11-30 06:18:11 Re: Linux v.s. Mac OS-X Performance