Skip site navigation (1) Skip section navigation (2)

Re: log_statement at postgres.conf

From: Pomarede Nicolas <npomarede(at)corp(dot)free(dot)fr>
To: System/IJS - Joko <system(at)ijs(dot)co(dot)id>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: log_statement at postgres.conf
Date: 2008-07-21 08:27:35
Message-ID: Pine.LNX.4.64.0807211023260.11758@localhost (view raw or flat)
Thread:
Lists: pgsql-performance
On Mon, 21 Jul 2008, System/IJS - Joko wrote:

> Thx a lot Nicolas,
>
> I finaly success to log query statement because of your simple explanation.
> I have other question:
> 1. Is there posibility to automatically logging that statement to table?

I don't know, never tried that.

> 2. All of that statement is come from every database on my server,
> could I know from which database that statement come?
> or at least I can filter to log only from database X ?

You can modify 'log_line_prefix' to add the database name :
use '%d %t %p %r ' instead of the default '%t %p %r ' for example.

> 3. If I need to log only changed made on my database, then the value of 
> 'log_statement' is 'mod' ?

yes


Nicolas


In response to

pgsql-performance by date

Next:From: Stephane BailliezDate: 2008-07-21 08:53:14
Subject: Re: Performance on Sun Fire X4150 x64 (dd, bonnie++, pgbench)
Previous:From: System/IJS - JokoDate: 2008-07-21 06:35:20
Subject: Re: log_statement at postgres.conf

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group