• Data Warehouse Service

dws
  1. Help Center
  2. Data Warehouse Service
  3. Developer Guide
  4. Systems Tables and Views
  5. PG_PARTITION

PG_PARTITION

PG_PARTITION stores all partitioned tables, table partitions, toast tables on table partitions, and index partitions in the database. Partitioned index information is not stored in the PG_PARTITION system catalog.

Table 1 PG_PARTITION columns

Name

Type

Description

relname

name

Names of the partitioned tables, table partitions, toast tables on table partitions, and index partitions

parttype

"char"

Object type

  • r indicates a partitioned table.
  • p indicates a table partition.
  • x indicates an index partition.
  • t indicates a toast table.

parentid

oid

OID of the partitioned table in PG_CLASS when the object is a partitioned table or table partition

OID of the partitioned index when the object is an index partition

rangenum

integer

Reserved field.

intervalnum

integer

Reserved field.

partstrategy

"char"

Partition policy of the partitioned table. The following policies are supported:

r indicates the range partition.

v indicates the numeric partition

relfilenode

oid

Physical storage locations of the table partition, index partition, and toast table on the table partition.

reltablespace

oid

OID of the tablespace containing the table partition, index partition, toast table on the table partition

relpages

double precision

Statistics: numbers of data pages of the table partition and index partition

reltuples

double precision

Statistics: numbers of tuples of the table partition and index partition.

relallvisible

integer

Statistics: number of visible data pages of the table partition and index partition.

reltoastrelid

oid

OID of the toast table corresponding to the table partition

reltoastidxid

oid

OID of the toast table index corresponding to the table partition

indextblid

oid

OID of the table partition corresponding to the index partition

indisusable

Boolean

Whether the index partition is available

reldeltarelid

oid

OID of a Delta table

reldeltaidx

oid

OID of the index for a Delta table

relcudescrelid

oid

OID of a CU description table

relcudescidx

oid

OID of the index for a CU description table

relfrozenxid

xid

frozen transaction ID.

intspnum

integer

Number of tablespaces that the interval partition belongs to

partkey

int2vector

Column number of the partition key

intervaltablespace

oidvector

Tablespace that the interval partition belongs to. Interval partitions fall in the tablespaces in the round-robin manner

interval

text[]

Interval value of the interval partition

boundaries

text[]

Upper boundary of the range partition and interval partition

transit

text[]

Transit of the interval partition

reloptions

text[]

Storage property of a partition used for collecting online scale-out information. Same as pg_class.reloptions, it is a keyword=value string.