Re: Log all queries before migration ?

From: "Charles Clavadetscher" <clavadetscher(at)swisspug(dot)org>
To: "'ben(dot)play'" <benjamin(dot)cohen(at)playrion(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Log all queries before migration ?
Date: 2016-08-03 14:10:26
Message-ID: 033601d1ed90$cef0dbe0$6cd293a0$@swisspug.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello

> -----Original Message-----
> From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of ben.play
> Sent: Mittwoch, 3. August 2016 15:29
> To: pgsql-general(at)postgresql(dot)org
> Subject: Re: [GENERAL] Log all queries before migration ?
>
> Hi guys,
>
> In fact, I would like to copy a table and then, when everything is finish, execute all inserts and updates since the
> beginning of the copy.
>
> The biggest problem with the log at this time it's the query.
> All my queries are not runnable.

This may help you?

http://laurenz.github.io/pgreplay/

Regards
Charles

>
> When I log, I see this kind of queries :
> "duration: 0.046 ms parse <unnamed>: UPDATE user SET money = money + $1 WHERE id = $2"
>
> But I would like to have only : "UPDATE user SET money = money + 100 WHERE id = 1281012"
>
> This is our postgresql.conf :
> log_destination = 'csvlog'
> logging_collector = on
> log_min_duration_statement = 0
> log_statement = mod
> log_directory = '/media/hdd/log_queries'
> log_filename='log_insert.log'
> log_file_mode = 0600
> log_error_verbosity = verbose
>
>
> What do we have to change ?
>
> Thank you a lot for your help !
>
>
>
> --
> View this message in context: http://postgresql.nabble.com/Log-all-queries-before-migration-tp5913922p5914599.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org) To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Melvin Davidson 2016-08-03 14:23:01 Re: Log all queries before migration ?
Previous Message ben.play 2016-08-03 13:28:38 Re: Log all queries before migration ?