GreenPlum 调研笔记

《Greenplum企业应用实战》一书第四章读书笔记。

数据字典

这里的数据字典指的是 Greenplum 中元数据信息,包括:pg_ 和 gp_ 开头的一些系统表。

oid

oid 是 PG/GP 中用来表示对象(包括:表、函数、操作符等等)的全局递增 id (是32位数字),GP 中绝大多数数据字典通过oid相互关联。

表名、函数名、操作符名可以和 oid 相互转换:

1
2
3
4
5
6
7
8
9

-- 类似的还有
-- regclass : pg_class中的oid关联
-- regproc/regprocedure : pg_proc 中的oid关联
-- regoper/regoperator:pg_operator中的oid关联

-- pg_class表的oid是1259
select 1259::regclass ;
select oid,relname from pg_class where oid='pg_class'::regclass;

数据库集群信息

gp_configuration
gp_segment_configuration