Where does PostgreSQL store the database?

后端 未结 13 1702
忘了有多久
忘了有多久 2020-11-27 09:14

Where are the files for a PostgreSQL database stored?

相关标签:
13条回答
  • 2020-11-27 10:01

    To see where the data directory is, use this query.

    show data_directory;
    

    To see all the run-time parameters, use

    show all;
    

    You can create tablespaces to store database objects in other parts of the filesystem. To see tablespaces, which might not be in that data directory, use this query.

    SELECT * FROM pg_tablespace;
    
    0 讨论(0)
提交回复
热议问题