Re: Can not change log_min_duration_statement parameter on PG 8.2.4

From: Nicolas Payart <payart+postgresql(at)benchmark(dot)fr>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Can not change log_min_duration_statement parameter on PG 8.2.4
Date: 2010-07-19 15:03:29
Message-ID: 4C446941.8020905@benchmark.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ooops, I just realized I set the parameter to the ROLE postgres a few
weeks ago...

ALTER ROLE postgres SET log_min_duration_statement TO DEFAULT;

solved my problem... which was not a problem in fact, juste a mistake :|

--
Nico

Le 19/07/2010 12:36, Nico a écrit :
> Hello,
>
> I am running a 8.2.4 PostgreSQL instance on a debian etch server.
> I have a problem trying to change the parameter
> log_min_duration_statement.
> Its actuel value in the postgresql.conf is "-1" (log off) :
>
> log_min_duration_statement = -1 # -1 is disabled, 0 logs all
> statements
> # and their durations.
>
> I reloaded (even restarted) the service, but when I connect to any
> database (even a newly created one), the log_min_duration_statement is
> still "0".
> And effectively, all the queries executed on the server are logged.
>
> The parameter does not seem to be set for the database though :
>
> postgres=# SELECT datconfig from pg_database where datname = 'postgres' ;
> datconfig
> -----------
>
> (1 ligne)
>
>
> If I set a new value for the database with an ALTER DATABASE command,
> then disconnect and reconnect, the value is still "0" :
>
>
> postgres=# ALTER DATABASE postgres SET log_min_duration_statement to
> 2000;
> ALTER DATABASE
> postgres=# \q
> 12:29| root(at)myserver:~ # psql -U postgres
> Bienvenue dans psql 8.2.4, l'interface interactive de PostgreSQL.
>
> Tapez: \copyright pour les termes de distribution
> \h pour l'aide-mémoire des commandes SQL
> \? pour l'aide-mémoire des commandes psql
> \g ou point-virgule en fin d'instruction pour exécuter la requête
> \q pour quitter
>
> postgres=# SELECT datconfig from pg_database where datname = 'postgres' ;
> datconfig
> -----------------------------------
> {log_min_duration_statement=2000}
> (1 ligne)
>
> postgres=# SHOW log_min_duration_statement ;
> log_min_duration_statement
> ----------------------------
> 0
> (1 ligne)
>
> postgres=#
>
>
> Though I can set a new value for one session :
>
> postgres=# SET log_min_duration_statement to 2500;
> SET
> postgres=# SHOW log_min_duration_statement ;
> log_min_duration_statement
> ----------------------------
> 2500ms
> (1 ligne)
>
>
>
> Am I missing something ?
>
> Thanks for your help !
> Nico
>
>

--
Nicolas PAYART
Administrateur de bases de données
Benchmark Group
Atalis 2 - Bât D
3, rue de Paris
35510 Cesson Sévigné
France
Int : 3014
Tél : +33 2 23 45 20 19
Fax : +33 2 99 83 39 24
http://www.journaldunet.com
http://www.linternaute.com
http://www.benchmark.fr
http://www.copainsdavant.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message arno 2010-07-19 15:55:48 index scan and functions
Previous Message Craig Ringer 2010-07-19 14:45:16 Re: Rescue data after power off