PostgreSQL在哪里存储数据库? [英] Where does PostgreSQL store the database?

查看:104
本文介绍了PostgreSQL在哪里存储数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PostgreSQL数据库的文件存储在哪里?

Where are the files for a PostgreSQL database stored?

推荐答案

要查看数据目录在哪里,请使用此查询.

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;

这篇关于PostgreSQL在哪里存储数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆