I am using PostgreSQL on Mac, I have created several databases using command line. I am looking into /Library/PostgreSQL/9.2/data and I can not see any .dat file. Am I looking into the wrong place for data files?
I have used the following command: ps auxw | grep postgres | grep -- -D as mentioned PostgreSQL database default location on Linux and it gives me the /Library/PostgreSQL/9.2/data directory.
Any ideas?
select setting from pg_settings where name = 'data_directory'
and
ps auxw | grep postgres | grep -- -D
both generate the same result. The first one through postgresql, second one command line. Thanks to @a_horse_with_no_name
PostgreSQL lets you store data in relatively arbitrary locations in the filesystem. The default location, which you can get with show data_directory
, isn't the whole story.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With