select setting from pg_settings where name = 'data_directory'
and
ps auxw | grep postgres | grep -- -D
both generate the same result. The first is through postgresql, the second is on the command line. Thanks @a_horse_with_no_name
sheidaei
source share