0

I'm using PostgreSQL-server 9.3.5. After setting log_min_duration_statement to 1000ms I'm sending SIGHUP and see that server resets value to '-1':

-bash-4.1$ psql
psql (9.3.5)
Type "help" for help.

postgres=# select current_setting('log_min_duration_statement');
 current_setting
-----------------
 -1
(1 row)

postgres=# select set_config('log_min_duration_statement', '1000', 'true');
 set_config
------------
 1s
(1 row)

postgres=# select pg_reload_conf();
 pg_reload_conf
----------------
 t
(1 row)

postgres=# select current_setting('log_min_duration_statement');
 current_setting
-----------------
 -1
(1 row)

postgres=#

What may be an a root cause?

1 Answer 1

0
  1. After reload you get have settings from config (default)

  2. you must use false as 3 parameter - it is is_local - just for current transaction

sqldb=# select current_setting('log_min_duration_statement');
 current_setting 
-----------------
 -1
(1 row)

sqldb=# select set_config('log_min_duration_statement', '1000', false);
 set_config 
------------
 1s
(1 row)

sqldb=# select current_setting('log_min_duration_statement');
 current_setting 
-----------------
 1s
(1 row)
1
  • Very thnx, Roman!
    – user113254
    Commented Mar 6, 2017 at 11:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.