DBA Hub

📋Steps in this guide1/1

How to find data directory location

HOW TO FIND DATA DIRECTORY LOCATION

postgresql configurationintermediate
by MYSQL
25 views
1

How to find data directory location

HOW TO FIND DATA DIRECTORY LOCATION -- This will show location of important files in postgres

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
DATA_DIRECTORY - > Specifies the directory to use for data storage.
dbaclass=#
show data_directory;
data_directory
-----------------------------
/Library/PostgreSQL/10/data
(1 row)
dbaclass=#
select setting from pg_settings where name = 'data_directory';
setting
-----------------------------
/Library/PostgreSQL/10/data
(1 row)
dbaclass=#
SELECT name, setting FROM pg_settings WHERE category = 'File Locations';
name                     | setting
-------------------+---------------------------------------------
config_file              | /Library/PostgreSQL/10/data/postgresql.conf
data_directory           | /Library/PostgreSQL/10/data
external_pid_file        |
hba_file                 | /Library/PostgreSQL/10/data/pg_hba.conf
ident_file               | /Library/PostgreSQL/10/data/pg_ident.conf
(5 rows)

Comments (0)

Please to add comments

No comments yet. Be the first to comment!