using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; using System.IO; using NPOI.HSSF.UserModel; using NPOI.SS.UserModel; using NPOI.HPSF; using System.Drawing; using NPOI.SS.Util; using NPOI.HSSF.U
1. 场景描述 因项目数据量略大,每天大概有几百g的存储需求,并且是多项目公用greenplum集群,需要定期检查一下磁盘情况. 2. 解决方案 2.1 按用户/项目统计 2.1.1 SQL语句 SELECT d.datname AS Name, pg_catalog.pg_get_userbyid(d.datdba) AS Owner, CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') THEN pg_catal