Re: Extracting SQL from logs in a usable format

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: Chris Ernst <cernst(at)esoft(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Extracting SQL from logs in a usable format
Date: 2009-12-20 11:59:20
Message-ID: 20091220115920.GD1638@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)depesz(dot)com / aim:depeszhdl / skype:depesz_hdl / gg:6749007

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Larry Anderson 2009-12-20 13:02:20 Transaction started test
Previous Message JGuillaume (ioguix) de Rorthais 2009-12-20 10:18:08 Re: Extracting SQL from logs in a usable format