Alex's Slip-box

These are my org-mode notes in sort of Zettelkasten style

postgresql.conf

:ID: CD58C290-AF97-4882-98D9-2FCC7B61763E

See also psql

# Where is it?

This will print the path

psql -c "SHOW config_file;"

# Enabling extensions

# pg_stat_statements

  1. Add it to the conf

    shared_preload_libraries = 'pg_stat_statements'	# (change requires restart)
    
  2. Enable it using psql for the database of choice.

    psql -d mydatabase -c "create extension pg_stat_statements;"
    

# Data directory

Set the path using the PGDATA env var or set the data_directory variable in the conf.

# Making changes

  • Might consider checking this into source control for a given application.
  • Always restart postgres after making changes.

    systemctl restart postgresql
    

# Turn on log collection

Write logs to a file, but setting…

logging_collector = on

Search Results