Re: Full (special) logs for specified users/hosts/etc

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Full (special) logs for specified users/hosts/etc
Date: 2013-05-17 11:30:46
Message-ID: 519614E6.7020206@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 17.05.2013 12:29, Nikolay Samokhvalov wrote:
> Hello hackers,
>
> Consider a Postgres cluster containing several DBs (for example several
> projects/sites). If one wants to optimize queries on one specified site --
> what should he do? His obvious need is to switch full logging for the exact
> database on, collect the logs and analyze them using pgFouine/pgBadger.
>
> But currently, there is no way to specify log settings for one database /
> one user / one host. There are only *global* settings in postgres.conf.

alter database postgres set log_statement='all'

alter user foo set log_statement='all'

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2013-05-17 12:02:37 Re: counting algorithm for incremental matview maintenance
Previous Message Cédric Villemain 2013-05-17 11:04:57 Re: [HACKERS] PLJava for Postgres 9.2.