Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id E4AF064FD05 for ; Tue, 22 Jul 2008 09:24:53 -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 48260-06 for ; Tue, 22 Jul 2008 09:24:45 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smadev.internal.net (host3.dynacom.ondsl.gr [62.103.35.211]) by postgresql.org (Postfix) with ESMTP id 2D39464FED7 for ; Tue, 22 Jul 2008 09:24:49 -0300 (ADT) Received: from smadev.internal.net (localhost [127.0.0.1]) by smadev.internal.net (8.14.2/8.14.2) with ESMTP id m6MCOjAh044008; Tue, 22 Jul 2008 15:24:45 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Received: from localhost (localhost [[UNIX: localhost]]) by smadev.internal.net (8.14.2/8.14.2/Submit) id m6MCOjLO044007; Tue, 22 Jul 2008 15:24:45 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: pgsql-admin@postgresql.org Subject: Re: conditional logging based on client Date: Tue, 22 Jul 2008 15:24:44 +0300 User-Agent: KMail/1.9.7 Cc: "Rajesh Kumar Mallah" References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200807221524.45181.achill@matrix.gatewaynet.com> 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/184 X-Sequence-Number: 29794 =CE=A3=CF=84=CE=B9=CF=82 Tuesday 22 July 2008 15:17:42 =CE=BF/=CE=B7 Rajesh= Kumar Mallah =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: > Hi, >=20 > We want to log all SQLs that has been executed by using psql client. > we do not want to use .psql_history as it is distributed and may be > deleted by users . >=20 > The original objective is that we should be able to know what all hand ma= de > SQLs have been executed in past (which can date back as long as 1 year = even) You have to adjust log_statement in your postgresql.conf however you will have to bear in mind the performance implications of this. Normal production sites dont do this. You can enable/disable this kind of logging any time by killing -HUP >=20 > regds > Mallah. >=20 =2D-=20 Achilleas Mantzios