Can not change log_min_duration_statement parameter on PG 8.2.4

From: Nico <nico(at)koleo(dot)fr>
To: pgsql-general(at)postgresql(dot)org
Subject: Can not change log_min_duration_statement parameter on PG 8.2.4
Date: 2010-07-19 10:36:17
Message-ID: 4C442AA1.8040806@koleo.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message tuanhoanganh 2010-07-19 10:37:15 Re: Rescue data after power off
Previous Message tuanhoanganh 2010-07-19 10:00:53 Re: Rescue data after power off