pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pomarede Nicolas <npomarede@corp.free.fr>
To: System/IJS - Joko <system@ijs.co.id>
Cc: pgsql-performance@postgresql.org
Subject: Re: log_statement at postgres.conf
Date: Mon, 21 Jul 2008 10:27:35 +0200 (CEST)
Message-ID: <Pine.LNX.4.64.0807211023260.11758@localhost> (raw)
In-Reply-To: <009b01c8eafb$f29fa9e0$12068cc0@edp03>
References: <01a601c8e7e9$41ad45d0$12068cc0@edp03>
	<b41c75520807170229x7768f6d3u68fb6369bafea270@mail.gmail.com>
	<Pine.LNX.4.64.0807171134490.17374@localhost>
	<014d01c8e899$dc597670$12068cc0@edp03>
	<Pine.LNX.4.64.0807181013150.14417@localhost>
	<009b01c8eafb$f29fa9e0$12068cc0@edp03>

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




view thread (7+ messages)

Message-ID: <Pine.LNX.4.64.0807211023260.11758@localhost>
Permalink:  ../Pine.LNX.4.64.0807211023260.11758@localhost/
Also on:    postgresql.org/message-id/Pine.LNX.4.64.0807211023260.11758@localhost

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: npomarede@corp.free.fr, system@ijs.co.id
  Subject: Re: log_statement at postgres.conf
  In-Reply-To: <Pine.LNX.4.64.0807211023260.11758@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox