Created
August 1, 2018 10:33
-
-
Save grantpullen/8912e0e2d5cf8199d05052763d65b9db to your computer and use it in GitHub Desktop.
Postgres Update & View config directly via SQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Show current settings... | |
show config_file | |
show max_connections | |
show log_min_duration_statement | |
show log_directory | |
show data_directory | |
-- more detailed info on current settings... | |
select * from pg_settings where name='max_connections'; | |
-- update setting via sql | |
ALTER SYSTEM SET max_connections = 202; | |
ALTER SYSTEM SET log_min_duration_statement = '200' | |
-- reload settings... only apples to settings that support hot reload... | |
select pg_reload_conf() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment