tags:

views:

60

answers:

2

Is it possible to determine the cluster directory being used by a Postgres server, from the server itself -- i.e. the service, (under Windows) was started by something like:

C:\foo\postgres.exe -D "D:\emr\data"

Is there a SELECT query or function one can make to the running server to retrieve the value "D:\emr\data"?

Thanks Vince Marchetti

+1  A: 
SELECT setting FROM pg_settings WHERE name = 'data_directory'
Quassnoi
+1  A: 

(For completeness) And even shorter:

SHOW data_directory;
Milen A. Radev