Greenplum common data dictionary

First, the database cluster information

1、gp_segment_configration

2、pg_filespace_entry

These two tables are in pg_global table space below, it is a global table.

Cluster segment to view information such as the number of segment.

Second, common data dictionary table

1、pg_class 

Save all the tables, views, sequences, indexes the metadata information for each DDL / DML operations have a relationship with this table.

2、pg_attribute

 

Content record fields

3、gp_distribution_policy

Distribution of key records table

4, pg_statistic and pg_stats

Statistical information is stored in the database table in pg_statistic

pg_stats can easily help us to view the contents of pg_statistic

5、pg_partition

Record partition table information

6、pg_partition_rule

Partition Table partitioning rules

7、pg_partitions

Third, the application dictionary tables

1, to obtain field information

select a.attname,pg_catalog.format_type(a.atttypid,a.atttypmod)  as data_type 

from pg_catalog.pg_attribute a,

(

select c.oid

from pg_catalog.pg_class c

left join pg_catalog.pg_namespace n

   on n.oid = c.relnamespace

where c.relname = 'pg_class'

 and n.nspname='pg_catalog'

) b

where a.attrelid=b.oid

and a.attnum>0

and not a.attisdropped order by a.attnum;

Guess you like

Origin www.cnblogs.com/xibuhaohao/p/11121012.html