Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id C1C9464FD13 for ; Mon, 21 Jul 2008 03:35: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 12160-02 for ; Mon, 21 Jul 2008 03:35:36 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from unicorn.sby.dnet.net.id (unicorn.sby.dnet.net.id [202.148.11.52]) by postgresql.org (Postfix) with ESMTP id B4F5E64FCE7 for ; Mon, 21 Jul 2008 03:35:37 -0300 (ADT) Received: from unicorn.sby.dnet.net.id (localhost [127.0.0.1]) by unicorn.sby.dnet.net.id (Postfix) with ESMTP id 76AE123A02AD for ; Mon, 21 Jul 2008 13:35:32 +0700 (WIT) Received: from neptunus.sby.dnet.net.id (neptunus.sby.dnet.net.id [202.148.11.37]) by unicorn.sby.dnet.net.id (Postfix) with ESMTP id 0EBCD23A01F1 for ; Mon, 21 Jul 2008 13:35:32 +0700 (WIT) Received: from ijs.co.id (unknown [202.148.12.194]) by neptunus.sby.dnet.net.id (Postfix) with ESMTP id 2758797EEB for ; Mon, 21 Jul 2008 13:35:31 +0700 (WIT) Received: from edp03 ([192.140.6.18]) by ijs.co.id (ijs.co.id [192.140.6.10]) (MDaemon.PRO.v6.8.5.R) with ESMTP id 63-md50000000010.tmp for ; Mon, 21 Jul 2008 13:34:47 +0700 Message-ID: <009b01c8eafb$f29fa9e0$12068cc0@edp03> Reply-To: "System/IJS - Joko" From: "System/IJS - Joko" To: References: <01a601c8e7e9$41ad45d0$12068cc0@edp03> <014d01c8e899$dc597670$12068cc0@edp03> Subject: Re: log_statement at postgres.conf Date: Mon, 21 Jul 2008 13:35:20 +0700 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-MDRemoteIP: 192.140.6.18 X-Return-Path: system@ijs.co.id X-MDaemon-Deliver-To: pgsql-performance@postgresql.org X-Spam-Processed: ijs.co.id, Mon, 21 Jul 2008 13:34:47 +0700 X-Virus-Scanned: ClamAV using ClamSMTP 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/167 X-Sequence-Number: 30767 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? 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 ? 3. If I need to log only changed made on my database, then the value of 'log_statement' is 'mod' ? CMIIW Regards, Joko [SYSTEM] PT. Indra Jaya Swastika Phone: +62 31 7481388 Ext 201 http://www.ijs.co.id --sorry for my bad english ----- Original Message ----- From: "Pomarede Nicolas" To: "System/IJS - Joko" Cc: Sent: Friday, July 18, 2008 3:16 PM Subject: Re: [PERFORM] log_statement at postgres.conf > There're 2 points in your question : > > - what to log > - where to log > > To choose 'what' to log in your case, you can change 'log_statement' to > 'all'. > > Then, to choose 'where' to log, you can either use the proposal in the > first answer, or change 'log_destination' to 'stderr' and > 'redirect_stderr' to 'on'. > > Nicolas > -- If you have any problem with our services , please contact us at 70468146 or e-mail: helpdesk@ijs.co.id PT Indra Jaya Swastika | Jl. Kalianak Barat 57A | +62-31-7481388