Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pilgrim2go/be30fc20c1b6b508729255f90c26f7cf to your computer and use it in GitHub Desktop.
Save pilgrim2go/be30fc20c1b6b508729255f90c26f7cf 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