Skip to content

Instantly share code, notes, and snippets.

@vaughany
Created October 8, 2018 16:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save vaughany/6f85f5864901f43c9e4a9da72dfd5dac to your computer and use it in GitHub Desktop.
Save vaughany/6f85f5864901f43c9e4a9da72dfd5dac to your computer and use it in GitHub Desktop.
Changing Postgres' log_min_duration_statement setting

Changing Postgres' log_min_duration_statement setting on the fly

Check the setting:

SELECT * FROM pg_settings WHERE name = 'log_min_duration_statement';

Change the setting:

SET log_min_duration_statement TO 1000;

...or:

UPDATE pg_settings SET setting = 1000 WHERE name = 'log_min_duration_statement';

Reload the config:

SELECT pg_reload_conf();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment