Tag Archives: postgresql

Locating PostgreSQL data directory

Use a simple psql query to find the location of the data directory postgres=# SHOW data_directory; data_directory —————————— /var/lib/postgresql/8.4/main (1 row) Or postgres=# select setting from pg_settings where name = ‘data_directory’; setting —————————— /var/lib/postgresql/8.4/main (1 row)

Posted in tips | Tagged | Leave a comment