Re: Extracting SQL from logs in a usable format

From: "JGuillaume (ioguix) de Rorthais" <ioguix(at)free(dot)fr>
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: Chris Ernst *EXTERN* <cernst(at)esoft(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Extracting SQL from logs in a usable format
Date: 2009-12-20 10:09:54
Message-ID: 4B2DF7F2.7090905@free.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hey guys,

Albe Laurenz a écrit :
> Chris Ernst wrote:
>> I have a project where I need to be able to capture every query
>> from a production system into a file such that I can "replay"
>> them on a staging system. Does such a thing already exist or
>> should I start writing my own log parser?

I have the same problem. Our goal would be to capture from a 8.1 a
representative period and replay against a 8.4 to find out every
possible issues.

> I am currently developing such a beast, it is currently still quite
> alpha. If you are interested I can send you a copy. I'll try to
> publish it once it is sufficiently beta.

Interesting project, but but I have one big issue under 8.1 and
advanced query (prepare / bind / execute): we cannot extract values of
parameters from the logs with <8.2. So I am not able to parse /
rebuilt query from logs under 8.1.

I started something as well, based on tcpdump/tshark output (tshark
- -VT text ...). My project is in pre-alpha step, but at least I can
extract both simple queries and advanced queries w/ params. The only
known limitations with this approach are :
- cannot extract from SSL connections
- ISTM tshark only support PostgreSQL V3 protocol. So only work on
> 7.2 IIRC

> Yours, Laurenz Albe

- --
Jehan-Guillaume (ioguix) de Rorthais
www.dalibo.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkst9/EACgkQxWGfaAgowiJPNgCgia285amuwCXX2nl4/LaNSofR
N1wAnA8kuFKnP0vzAx/PCamheD/iKmNu
=ihow
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message JGuillaume (ioguix) de Rorthais 2009-12-20 10:18:08 Re: Extracting SQL from logs in a usable format
Previous Message Scott Marlowe 2009-12-20 09:24:45 Re: How to use read uncommitted transaction level and set update order