如何找到数据库“ postgres”文件夹的数据库名称? [英] How to find database name of \data\base postgres folders?

查看:269
本文介绍了如何找到数据库“ postgres”文件夹的数据库名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的postgres安装中有一个70 GB的大文件夹,

I have a large folder of 70 GB in my postgres installation under:

D:\Program Files\PostgreSQL\9.5 \data\base\130205

问题:如何找出基于该文件夹的数据库?
我喜欢在同一服务器上运行10个数据库,其中大多数数据库在不同的驱动器上有一个表空间。

Question: how could I find out which database is based on that folder? I have like 10 databases running on the same server, and most of them having a tablespace on a different drive.

但是可能我缺少某处的映射,可能是大型索引或某种类型的映射。我如何找出这些数据量的原因数据库?

But probably I'm missing a mapping somewhere, maybe a large index or kind of. How can I find out the "causing" database of these amounts of data?

推荐答案

感谢@a_horse的提示,以下语句显示了oid和表名:

Thanks to the hint of @a_horse, the following statement shows the oid and table names:

SELECT oid,* from pg_database

这篇关于如何找到数据库“ postgres”文件夹的数据库名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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