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

查看:44
本文介绍了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 *, pg_tablespace_location(oid) FROM pg_tablespace;

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

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