Re: Extracting SQL from logs in a usable format - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject Re: Extracting SQL from logs in a usable format
Date
Msg-id 20091220115920.GD1638@depesz.com
Whole thread Raw
In response to Extracting SQL from logs in a usable format  (Chris Ernst <cernst@esoft.com>)
Responses Re: Extracting SQL from logs in a usable format  (Craig Ringer <craig@postnewspapers.com.au>)
List pgsql-general
On Fri, Dec 18, 2009 at 02:08:07PM -0700, Chris Ernst wrote:
> Hi all,
>
> 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?

log to CSV format.

But:
1. not always all parts of the query will be logged in query itself
(prepared statements)
2. replying queries on 2nd machine doesn't quarantee that you will get
the same data afterwards.

depesz

--
Linkedin: http://www.linkedin.com/in/depesz  /  blog: http://www.depesz.com/
jid/gtalk: depesz@depesz.com / aim:depeszhdl / skype:depesz_hdl / gg:6749007

pgsql-general by date:

Previous
From: "JGuillaume (ioguix) de Rorthais"
Date:
Subject: Re: Extracting SQL from logs in a usable format
Next
From: Craig Ringer
Date:
Subject: Re: Extracting SQL from logs in a usable format