Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id F412B64FF27 for ; Mon, 21 Jul 2008 05:27:41 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 09556-02 for ; Mon, 21 Jul 2008 05:27:35 -0300 (ADT) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from smtp8-g19.free.fr (smtp8-g19.free.fr [212.27.42.65]) by postgresql.org (Postfix) with ESMTP id 1334C64FD13 for ; Mon, 21 Jul 2008 05:27:38 -0300 (ADT) Received: from smtp8-g19.free.fr (localhost [127.0.0.1]) by smtp8-g19.free.fr (Postfix) with ESMTP id 571BC17F564; Mon, 21 Jul 2008 10:27:36 +0200 (CEST) Received: from pulsar.staff.proxad.net (pulsar.staff.proxad.net [213.228.1.109]) by smtp8-g19.free.fr (Postfix) with ESMTP id 218AB17F561; Mon, 21 Jul 2008 10:27:35 +0200 (CEST) Date: Mon, 21 Jul 2008 10:27:35 +0200 (CEST) From: Pomarede Nicolas X-X-Sender: npomarede@localhost To: System/IJS - Joko cc: pgsql-performance@postgresql.org Subject: Re: log_statement at postgres.conf In-Reply-To: <009b01c8eafb$f29fa9e0$12068cc0@edp03> Message-ID: References: <01a601c8e7e9$41ad45d0$12068cc0@edp03> <014d01c8e899$dc597670$12068cc0@edp03> <009b01c8eafb$f29fa9e0$12068cc0@edp03> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200807/168 X-Sequence-Number: 30768 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