Find the location of Postgres data directory

Sudhakar Rayavaram
Jun 1, 2019 · 1 min read

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)

TarkaLabs TIL

Tarka Labs is a team of passionate hackers, designers and product managers. We believe in experimental methods to identify the best solutions to problems instead of working on technology du jour. (https://tarkalabs.com/)

Sudhakar Rayavaram

Written by

Software plumber, health and wellness enthusiast, digital artist, data visualization lover & …

TarkaLabs TIL

Tarka Labs is a team of passionate hackers, designers and product managers. We believe in experimental methods to identify the best solutions to problems instead of working on technology du jour. (https://tarkalabs.com/)

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade