Find the location of Postgres data directory
Published in
1 min readJun 1, 2019
In Postgres, it is not easy to find the location of the data folder because it can be overridden in multiple configuration files and also can be passed as a parameter when starting postgres server
However, there is an easy way to find it out from postgres interactive terminal by running the following command
show data_directory;
data_directory
— — — — — — — — — —
/var/lib/pgsql95/data
(1 row)