Skip to main content
added 28 characters in body
Source Link
András Váczi
  • 31.6k
  • 13
  • 101
  • 149
  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)

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. 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. 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)
Source Link

  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)