Skip site navigation (1) Skip section navigation (2)

Re: conditional logging based on client

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
Cc: "Rajesh Kumar Mallah" <mallah(dot)rajesh(at)gmail(dot)com>, "Achilleas Mantzios" <achill(at)matrix(dot)gatewaynet(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: conditional logging based on client
Date: 2008-07-23 19:12:03
Message-ID: 3289.1216840323@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
"Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> writes:
> 2008/7/22 Rajesh Kumar Mallah <mallah(dot)rajesh(at)gmail(dot)com>:
>> 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

In response to

pgsql-admin by date

Next:From: Marc FrommDate: 2008-07-23 22:48:29
Subject: -O to remove owner
Previous:From: Igor NeymanDate: 2008-07-23 18:22:00
Subject: Re: Query a list of tables

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group