Re: Tools for dumping pg_xlog, pg_clog, etc? - Mailing list pgsql-general

From Gerhard Wiesinger
Subject Re: Tools for dumping pg_xlog, pg_clog, etc?
Date
Msg-id Pine.LNX.4.64.0711260716450.1795@bbs.intern
Whole thread Raw
In response to Re: Tools for dumping pg_xlog, pg_clog, etc?  (Gerhard Wiesinger <lists@wiesinger.com>)
Responses Re: Tools for dumping pg_xlog, pg_clog, etc?  (Robert Treat <xzilla@users.sourceforge.net>)
List pgsql-general
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?
>>
>> Thanx.
>>
>> Ciao,
>> Gerhard
>>
>> --
>> http://www.wiesinger.com/
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 5: don't forget to increase your free space map settings
>>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>              http://www.postgresql.org/docs/faq
>

pgsql-general by date:

Previous
From: "Jeff Larsen"
Date:
Subject: Re: postgres schema printer
Next
From: Simon Riggs
Date:
Subject: Re: replication in Postgres