Skip to content

Instantly share code, notes, and snippets.

@hungneox
Last active October 1, 2024 10:49
Show Gist options
  • Save hungneox/d0ff5300788f3cc6dc408c29034b5550 to your computer and use it in GitHub Desktop.
Save hungneox/d0ff5300788f3cc6dc408c29034b5550 to your computer and use it in GitHub Desktop.
Disable / enable postgres query log

1. Find the log file

psql -U postgres -c 'SHOW config_file' 

2. Change the settings

log_statement = 'none'			# none, ddl, mod, all

3. Restart postgresql service

For MacOS

brew services restart postgresql@14
@hungneox
Copy link
Author

hungneox commented Oct 1, 2024

pg_dump -U postgres -h localhost -d mamma_development | gzip > ./mamma_development.sql.gz

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