xlogdump enhancements - Mailing list pgsql-hackers

From Diogo Biazus
Subject xlogdump enhancements
Date
Msg-id eca519a10607140643v186a1efdi48100c4ed33037a1@mail.gmail.com
Whole thread Raw
Responses Re: xlogdump enhancements  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
I'm working on Tom's xlogdump tool to add some functionality.<br />IMHO some useful improvements would be and an idea
ofimplementation:<br /><br /><br />- have an options to output only the transactions with their status and some
aggregatedata (transaction size). <br /><br />When the user pass a -t parameter, instead of printing echa record info
theprogram uses a linked list to acumulate the total length and status info about each xid. The status begin with NOT
COMMITED,it can change to COMMITED or ABORTED. If the user pass all the files in the pg_xlog directory as parameters he
knowsthe current status of each transaction. <br /><br />- Find loser transactions (not commited to the end of the
log)<br/><br />I though of doing this for the only transactions option (see above).<br /><br />- Have a filter to get a
specifidrmid<br /><br />There's always grep, but for windows users it might be interesting to filter records by rmid.
Therecan be a flag like -r (from rmname), or -o (operation) where the user can pass a parameter like: xact, heap,
etc...<br />And then filter the output records.<br /><br />- Option to translate OIDs to names given a database
connection<br/><br />I receive parameters to open a connection (the usual -h, -p and -U). In the startup I try to open
aconnection. If the user passes the parameters of the connection the application automaticaly enter in the translate
oidsmode. Then each data returning function tries to get from the connected database the objects name. <br /><br />-
Extractthe exact SQL statement in cases of xlog generated by insert/update/delete. <br clear="all" /><br />This is the
onewhere I need help from you the most. I'm not certain of how to implement. But as I can see, I'll need to get
object'sstructure from the system catalog to decode the statement. So this option will be available only if you have a
connectionto the database. Is this right? <br /><br />I'd like to have opinions on the subject. If somebody could give
mesome advice on how to start the last feature (decode the statemets) I'd apreciate very much.<br /><br />-- <br
/>DiogoBiazus - <a href="mailto:diogob@gmail.com" target="_blank" title="mailto:diogob@gmail.com
(mailto:diogob@gmail.com)(mailto:diogob@gmail.com) (mailto:diogob@gmail.com) (mailto:diogob@gmail.com)">
diogob@gmail.com</a><br/>Móvel Consultoria <br /><a href="http://www.movelinfo.com.br" target="_blank"
title="http://www.movelinfo.com.br(http://www.movelinfo.com.br) (http://www.movelinfo.com.br)
(http://www.movelinfo.com.br)(http://www.movelinfo.com.br)"> http://www.movelinfo.com.br</a><br /><a
href="http://www.postgresql.org.br"target="_blank" title="http://www.postgresql.org.br (http://www.postgresql.org.br)
(http://www.postgresql.org.br)(http://www.postgresql.org.br) (http://www.postgresql.org.br)">
http://www.postgresql.org.br</a> 

pgsql-hackers by date:

Previous
From: Thomas Hallgren
Date:
Subject: Re: monolithic distro
Next
From: "Marc G. Fournier"
Date:
Subject: Re: pgsql-patches considered harmful