Updated settings and commandline articles

master
androiddrew 6 years ago
parent 9eeb3724b7
commit 5a7e9f2c2c

@ -0,0 +1,5 @@
# Postgres commandline tools
## pg_ctl
##

@ -0,0 +1,14 @@
# FILES
## Logs
Log files can be found in two places. The most recent log file will be located in the postgres data directory. Other log files will be located via a config setting typically set to directory under the data directory. This can be found using the `SHOW log_directory` sql commnad.
## Config files
The configuration files are located directly under the
- postgresql.conf -
- postgres.auto.conf -
- pg_hba.conf -
-

@ -0,0 +1,32 @@
-- REOAD and RESTART
--
-- As a superuser you can trigger a configuration reload with
-- SELECT pg_reload_conf();
-- Some config(fundamental) changes require a restart. Use the cmd commands:
-- `service postgresql-<your version> restart`
-- `pg_ctl restart -D <your data dirctory>`
-- LOCATION OF CONFIG FILES
--
SELECT name, setting
FROM pg_settings
WHERE category = 'File Locations';
-- CHECK postgresql.conf SETTINGS
--
SELECT name, context, unit, setting, boot_val, reset_val
FROM pg_settings
WHERE name IN ('listen_addresses', 'deadlock_timeout', 'shared_buffers',
'effective_cache_size', 'work_mem', 'maintenance_work_mem')
ORDER BY context, name;
-- SHOW keyword
-- We can use the SHOW sql command to display settings with a labeled results in a labeled
SHOW ALL;
-- Individual settings can also be shown
SHOW work_mem;
--ALTER postgresql.conf SETTINGS
-- ALTER SYSTEM SET work_mem = '500MB';
Loading…
Cancel
Save