Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id BE3486502DB for ; Wed, 23 Jul 2008 16:17:19 -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 71747-04-3 for ; Wed, 23 Jul 2008 16:17:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 63B75650302 for ; Wed, 23 Jul 2008 16:12:18 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m6NJC3mZ003290; Wed, 23 Jul 2008 15:12:03 -0400 (EDT) To: "Scott Marlowe" cc: "Rajesh Kumar Mallah" , "Achilleas Mantzios" , pgsql-admin@postgresql.org Subject: Re: conditional logging based on client In-reply-to: References: <200807221524.45181.achill@matrix.gatewaynet.com> Comments: In-reply-to "Scott Marlowe" message dated "Wed, 23 Jul 2008 11:22:39 -0600" Date: Wed, 23 Jul 2008 15:12:03 -0400 Message-ID: <3289.1216840323@sss.pgh.pa.us> From: Tom Lane 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/203 X-Sequence-Number: 29813 "Scott Marlowe" writes: > 2008/7/22 Rajesh Kumar Mallah : >> any hit on performance is not desired. >> is it possible to alter logging behaviour just for the >> psql session ? > Set log_statement='ddl' in your postgresql.conf and pgsql will log all > ddl that hits the database. It won't log other stuff, just the ddl. I think the OP didn't want *all* sessions doing this but just selected sessions; so ALTER USER ... SET log_statement, or possibly ALTER DATABASE ... SET, would perhaps serve better. regards, tom lane