From 580f9387096573705faecd667ac7003772761365 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Tue, 30 Jan 2024 15:55:38 +0800 Subject: [PATCH 01/13] docs: add 1st batch of system table docs --- docs/sys-catalogs/sys-table-overview.md | 0 .../sys-tbl-gp-configuration-history.md | 17 ++++++++++ .../sys-tbl-gp-distribution-policy.md | 16 ++++++++++ .../sys-tables/sys-tbl-gp-fastsequence.md | 13 ++++++++ docs/sys-catalogs/sys-tables/sys-tbl-gp-id.md | 14 ++++++++ .../sys-tbl-gp-partition-template.md | 19 +++++++++++ .../sys-tbl-gp-segment-configuration.md | 20 ++++++++++++ .../sys-tbl-gp-version-at-initdb.md | 12 +++++++ .../sys-tables/sys-tbl-pg-aggregate.md | 32 +++++++++++++++++++ docs/sys-catalogs/sys-tables/sys-tbl-pg-am.md | 14 ++++++++ .../sys-tables/sys-tbl-pg-amop.md | 21 ++++++++++++ docs/sys-catalogs/sys-view-overview.md | 0 .../sys-catalogs/sys-table-overview.md | 0 .../sys-tbl-gp-configuration-history.md | 5 +++ .../sys-tbl-gp-distribution-policy.md | 5 +++ .../sys-tables/sys-tbl-gp-fastsequence.md | 5 +++ .../sys-catalogs/sys-tables/sys-tbl-gp-id.md | 5 +++ .../sys-tbl-gp-partition-template.md | 5 +++ .../sys-tbl-gp-segment-configuration.md | 5 +++ .../sys-tbl-gp-version-at-initdb.md | 5 +++ .../sys-tables/sys-tbl-pg-aggregate.md | 5 +++ .../sys-catalogs/sys-tables/sys-tbl-pg-am.md | 5 +++ .../sys-tables/sys-tbl-pg-amop.md | 5 +++ .../current/sys-catalogs/sys-view-overview.md | 0 24 files changed, 228 insertions(+) create mode 100644 docs/sys-catalogs/sys-table-overview.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-gp-id.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-am.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-amop.md create mode 100644 docs/sys-catalogs/sys-view-overview.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-table-overview.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-id.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-am.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-amop.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-view-overview.md diff --git a/docs/sys-catalogs/sys-table-overview.md b/docs/sys-catalogs/sys-table-overview.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md b/docs/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md new file mode 100644 index 0000000000..48be53c3bf --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md @@ -0,0 +1,17 @@ +--- +title: gp_configuration_history +--- + +# gp_configuration_history + +The `gp_configuration_history` table in the `pg_catalog` schema contains information about system changes related to fault detection and recovery operations. The `fts_probe` process logs data to this table, as do certain related management utilities such as `gprecoverseg` and `gpinitsystem`. For example, when you add a new segment and mirror segment to the system, records for these events are logged to `gp_configuration_history`. + +The event descriptions stored in this table may be helpful for troubleshooting serious system issues in collaboration with VMware Support technicians. + +This table is populated only on the coordinator. This table is defined in the `pg_global` tablespace, meaning it is globally shared across all databases in the system. + +|column|type|references|description| +|------|----|----------|-----------| +|`time`|timestamp with time zone| |Timestamp for the event recorded.| +|`dbid`|smallint| `gp_segment_configuration.dbid` |System-assigned ID. The unique identifier of a segment (or coordinator) instance.| +| `desc` |text| |Text description of the event.| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md b/docs/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md new file mode 100644 index 0000000000..03e27fde87 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md @@ -0,0 +1,16 @@ +--- +title: gp_distribution_policy +--- + +# gp_distribution_policy + +The `gp_distribution_policy` table in the `pg_catalog` schema contains information about Greenplum Database tables and their policy for distributing table data across the segments. This table is populated only on the coordinator. This table is not globally shared, meaning each database has its own copy of this table. + +|column|type|references|description| +|------|----|----------|-----------| +|`localoid`|oid| `pg_class.oid` |The table object identifier (OID).| +|`policytype`|char| |The table distribution policy:

`p` - Partitioned policy. Table data is distributed among segment instances.

`r` - Replicated policy. Table data is replicated on each segment instance.| +|`numsegments`|integer| |The number of segment instances on which the table data is distributed.| +|`distkey`|int2vector| `pg_attribute.attnum` |The column number(s) of the distribution column(s).| +|`distclass`|oidvector|`pg_opclass.oid`|The operator class identifier(s) of the distribution column(s).| + diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md b/docs/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md new file mode 100644 index 0000000000..3f36810dea --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md @@ -0,0 +1,13 @@ +--- +title: gp_fastsequence +--- + +# gp_fastsequence + +The `gp_fastsequence` table in the `pg_catalog` schema contains information about append-optimized and column-oriented tables. The `last_sequence` value indicates maximum row number currently used by the table. + +|column|type|references|description| +|------|----|----------|-----------| +|`objid`|oid| `pg_class.oid` |Object id of the `pg_aoseg.pg_aocsseg_*` table used to track append-optimized file segments.| +|`objmod`|bigint| |Object modifier.| +|`last_sequence`|bigint| |The last sequence number used by the object.| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-gp-id.md b/docs/sys-catalogs/sys-tables/sys-tbl-gp-id.md new file mode 100644 index 0000000000..41a383ad23 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-gp-id.md @@ -0,0 +1,14 @@ +--- +title: gp_id +--- + +# gp_id + +The `gp_id` system catalog table in the `pg_catalog` schema identifies the Cloudberry Database system name and number of segments for the system. It also has `local` values for the particular database instance (segment or coordinator) on which the table resides. This table is defined in the `pg_global` tablespace, meaning it is globally shared across all databases in the system. + +|column|type|references|description| +|------|----|----------|-----------| +|`gpname`|name| |The name of this Cloudberry Database system.| +|`numsegments`|smallint| |The number of segments in the Cloudberry Database system.| +|`dbid`|smallint| |The unique identifier of this segment (or coordinator) instance.| +|`content`|smallint| |The ID for the portion of data on this segment instance. A primary and its mirror will have the same content ID.

For a segment the value is from 0-*N-1*, where *N* is the number of segments in Cloudberry Database.

For the coordinator, the value is -1.| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md b/docs/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md new file mode 100644 index 0000000000..d0ad326c19 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md @@ -0,0 +1,19 @@ +--- +title: gp_partition_template +--- + +# gp_partition_template + +The `gp_partition_template` system catalog table in the `pg_catalog` schema describes the relationship between a partitioned table and the sub-partition template defined at each level in the partition hierarchy. + +:::info +Cloudberry Database supports sub-partition templates only for partitioned tables that you create with the classic syntax. +::: + +Each sub-partition template has a dependency on the existence of a template at the next lower level of the hierarchy. + +|column|type|references|description| +|------|----|----------|-----------| +|`relid`| oid | `pg_class.oid` | The object identifier of the root partitioned table. | +|`level`|smallint| | The level of the partition in the hierarchy. The levels are numbered as follows: level `0` is the root partitioned table itself, level `1` represents the direct child/children of the root partitioned table, and so forth. The leaf partitions have the highest level number.| +|`template`| `pg_node_tree` | | Expression representation of the sub-partition template defined for each partition at this level of the hierarchy. | diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md b/docs/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md new file mode 100644 index 0000000000..41f6d72aa5 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md @@ -0,0 +1,20 @@ +--- +title: gp_segment_configuration +--- + +# gp_segment_configuration + +The `gp_segment_configuration` table in the `pg_catalog` schema contains information about mirroring and segment instance configuration. + +|column|type|references|description| +|------|----|----------|-----------| +|`dbid`|smallint| |Unique identifier of a segment (or coordinator) instance.| +|`content`|smallint| |The content identifier for a segment instance. A primary segment instance and its corresponding mirror will always have the same content identifier.

For a segment the value is from 0 to *N*-1, where *N* is the number of primary segments in the system.

For the coordinator, the value is always -1.| +|`role`|char| |The role that a segment is currently running as. Values are `p` (primary) or `m` (mirror).| +|`preferred_role`|char| |The role that a segment was originally assigned at initialization time. Values are `p` (primary) or `m` (mirror).| +|`mode`|char| |The synchronization status of a segment instance with its mirror copy. Values are `s` (Synchronized) or `n` (Not In Sync).

This column always shows `n` for the coordinator segment and `s` for the standby coordinator segment, but these values do not describe the synchronization state for the coordinator segment. Use `gp_stat_replication` to determine the synchronization state between the coordinator and standby coordinator.| +|`status`|char| |The fault status of a segment instance. Values are `u` (up) or `d` (down).| +|`port`|integer| |The TCP port the database server listener process is using.| +|`hostname`|text| |The hostname of a segment host.| +|`address`|text| |The hostname used to access a particular segment instance on a segment host. This value may be the same as `hostname` on systems that do not have per-interface hostnames configured.| +|`datadir`|text| |Segment instance data directory.| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md b/docs/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md new file mode 100644 index 0000000000..9c64fc23f4 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md @@ -0,0 +1,12 @@ +--- +title: gp_version_at_initdb +--- + +# gp_version_at_initdb + +The `gp_version_at_initdb` table in the `pg_catalog` schema is populated on the coordinator and each segment in the Cloudberry Database system. It identifies the version of Cloudberry Database used when the system was first initialized. This table is defined in the `pg_global` tablespace, meaning it is globally shared across all databases in the system. + +|column|type|references|description| +|------|----|----------|-----------| +|`schemaversion`|smallint| |Schema version number.| +|`productversion`|text| |Product version number.| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md new file mode 100644 index 0000000000..371ecf08da --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md @@ -0,0 +1,32 @@ +--- +title: pg_aggregate +--- + +# pg_aggregate + +The `pg_aggregate` table in the `pg_catalog` schema stores information about aggregate functions. An aggregate function is a function that operates on a set of values (typically one column from each row that matches a query condition) and returns a single value computed from all these values. Typical aggregate functions are `sum`, `count`, and `max`. Each entry in `pg_aggregate` is an extension of an entry in `pg_proc`. The `pg_proc` entry carries the aggregate's name, input and output data types, and other information that is similar to ordinary functions. + +|column|type|references|description| +|------|----|----------|-----------| +|`aggfnoid`|regproc|`pg_proc.oid`|OID of the aggregate function| +|`aggkind`|char| |Aggregate kind: `n` for *normal* aggregates, `o` for *ordered-set* aggregates, or `h` for *hypothetical-set* aggregates| +|`aggnumdirectargs`|smallint| |Number of direct (non-aggregated) arguments of an ordered-set or hypothetical-set aggregate, counting a variadic array as one argument. If equal to `pronargs`, the aggregate must be variadic and the variadic array describes the aggregated arguments as well as the final direct arguments. Always zero for normal aggregates.| +|`aggtransfn`|regproc|`pg_proc.oid`|Transition function OID| +|`aggfinalfn`|regproc|`pg_proc.oid`|Final function OID (zero if none)| +|`aggcombinefn`|regproc|`pg_proc.oid`|Combine function OID (zero if none)| +|`aggserialfn`|regproc|`pg_proc.oid`|OID of the serialization function to convert transtype to `bytea` (zero if none)| +|`aggdeserialfn`|regproc|`pg_proc.oid`|OID of the deserialization function to convert `bytea` to transtype (zero if none)| +|`aggmtransfn`|regproc|`pg_proc.oid`|Forward transition function OID for moving-aggregate mode (zero if none)| +|`aggminvtransfn`|regproc|`pg_proc.oid`|Inverse transition function OID for moving-aggregate mode (zero if none)| +|`aggmfinalfn`|regproc|`pg_proc.oid`|Final function OID for moving-aggregate mode (zero if none)| +|`aggfinalextra`|bool| |True to pass extra dummy arguments to `aggfinalfn`| +|`aggmfinalextra`|bool| |True to pass extra dummy arguments to `aggmfinalfn`| +|`aggfinalmodify`|char| |Indicates whether `aggfinalfn` modifies the transition state| +|`aggmfinalmodify`|char| |Indicates whether `aggmfinalfn` modifies the transition state| +|`aggsortop`|oid|`pg_operator.oid`|Associated sort operator OID (zero if none)| +|`aggtranstype`|oid|`pg_type.oid`|Data type of the aggregate function's internal transition (state) data| +|`aggtransspace`|integer| |Approximate average size (in bytes) of the transition state data, or zero to use a default estimate| +|`aggmtranstype`|oid|`pg_type.oid`|Data type of the aggregate function's internal transition (state) data for moving-aggregate mode (zero if none)| +|`aggmtransspace`|integer| |Approximate average size (in bytes) of the transition state data for moving-aggregate mode, or zero to use a default estimate| +|`agginitval`|text| |The initial value of the transition state. This is a text field containing the initial value in its external string representation. If this field is NULL, the transition state value starts out NULL.| +|`aggminitval`|text| |The initial value of the transition state for moving- aggregate mode. This is a text field containing the initial value in its external string representation. If this field is NULL, the transition state value starts out NULL.| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-am.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-am.md new file mode 100644 index 0000000000..8f502ea737 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-am.md @@ -0,0 +1,14 @@ +--- +title: pg_am +--- + +# pg_am + +The `pg_am` table in the `pg_catalog` schema stores information about index access methods. There is one row for each index access method supported by the system. + +|column|type|references|description| +|------|----|----------|-----------| +|`oid`|oid| |Row identifier (hidden attribute; must be explicitly selected)| +|`amname`|name| |Name of the access method| +|`amhandler`|regproc| | OID of a handler function responsible for supplying information about the access method| +|`amtype`|char| |`t` for table (including materialized views), `i` for index| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-amop.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-amop.md new file mode 100644 index 0000000000..f74fd77e25 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-amop.md @@ -0,0 +1,21 @@ +--- +title: pg_amop +--- + +# pg_amop + +The `pg_amop` table in the `pg_catalog` schema stores information about operators associated with index access method operator classes. There is one row for each operator that is a member of an operator class. + +An entry's `amopmethod` must match the `opfmethod` of its containing operator family (including `amopmethod` here is an intentional denormalization of the catalog structure for performance reasons). Also, `amoplefttype` and `amoprighttype` must match the `oprleft` and `oprright` fields of the referenced `pg_operator` entry. + +|column|type|references|description| +|------|----|----------|-----------| +|`oid`|oid| |Row identifier (hidden attribute; must be explicitly selected)| +|`amopfamily`|oid| `pg_opfamily.oid` |The operator family that this entry is for| +|`amoplefttype`|oid|`pg_type.oid`|Left-hand input data type of operator| +|`amoprighttype`|oid|`pg_type.oid`|Right-hand input data type of operator| +|`amopstrategy`|smallint| |Operator strategy number| +|`amoppurpose`|char| |Operator purpose, either `s` for search or `o` for ordering| +|`amopopr`|oid|`pg_operator.oid`|OID of the operator| +|`amopmethod`|oid|`pg_am.oid`|Index access method for the operator family| +|`amopsortfamily`|oid|`pg_opfamily.oid`|If an ordering operator, the B-tree operator family that this entry sorts according to; zero if a search operator| diff --git a/docs/sys-catalogs/sys-view-overview.md b/docs/sys-catalogs/sys-view-overview.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-table-overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-table-overview.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md new file mode 100644 index 0000000000..0b96913b82 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md @@ -0,0 +1,5 @@ +--- +title: gp_configuration_history +--- + +# gp_configuration_history diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md new file mode 100644 index 0000000000..cce473ceba --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md @@ -0,0 +1,5 @@ +--- +title: gp_distribution_policy +--- + +# gp_distribution_policy diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md new file mode 100644 index 0000000000..9e745ea289 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md @@ -0,0 +1,5 @@ +--- +title: gp_fastsequence +--- + +# gp_fastsequence diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-id.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-id.md new file mode 100644 index 0000000000..0b17c0cd90 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-id.md @@ -0,0 +1,5 @@ +--- +title: gp_id +--- + +# gp_id diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md new file mode 100644 index 0000000000..a86bffbeb3 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md @@ -0,0 +1,5 @@ +--- +title: gp_partition_template +--- + +# gp_partition_template diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md new file mode 100644 index 0000000000..6b3c774a4f --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md @@ -0,0 +1,5 @@ +--- +title: gp_segment_configuration +--- + +# gp_segment_configuration diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md new file mode 100644 index 0000000000..6cc6e769e1 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md @@ -0,0 +1,5 @@ +--- +title: gp_version_at_initdb +--- + +# gp_version_at_initdb diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md new file mode 100644 index 0000000000..74835419f4 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md @@ -0,0 +1,5 @@ +--- +title: pg_aggregate +--- + +# pg_aggregate diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-am.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-am.md new file mode 100644 index 0000000000..afcae2a362 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-am.md @@ -0,0 +1,5 @@ +--- +title: pg_am +--- + +# pg_am diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-amop.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-amop.md new file mode 100644 index 0000000000..a6d7a28368 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-amop.md @@ -0,0 +1,5 @@ +--- +title: pg_amop +--- + +# pg_amop diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-view-overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-view-overview.md new file mode 100644 index 0000000000..e69de29bb2 From 517f7b55e985c0e7ae93ff58befe17937a6ae4df Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Tue, 30 Jan 2024 16:25:51 +0800 Subject: [PATCH 02/13] Update sys-table-overview.md --- docs/sys-catalogs/sys-table-overview.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/sys-catalogs/sys-table-overview.md b/docs/sys-catalogs/sys-table-overview.md index e69de29bb2..c8a222c7d7 100644 --- a/docs/sys-catalogs/sys-table-overview.md +++ b/docs/sys-catalogs/sys-table-overview.md @@ -0,0 +1,20 @@ + +[`gp_configuration_history`](/docs/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md) + +[`gp_distribution_policy`](/docs/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md) + +[`gp_fastsequence`](/docs/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md) + +[`gp_id`](/docs/sys-catalogs/sys-tables/sys-tbl-gp-id.md) + +[`gp_partition_template`](/docs/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md) + +[`gp_segment_configuration`](/docs/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md) + +[`gp_version_at_initdb`](/docs/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md) + +[`pg_aggregate`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md) + +[`pg_am`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-am.md) + +[`pg_amop`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-amop.md) From 57efd13f48da973fce4532c07852f12be855f7b0 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Wed, 31 Jan 2024 17:33:01 +0800 Subject: [PATCH 03/13] add more docs --- .../sys-tables/sys-tbl-pg-amproc.md | 16 +++++++ .../sys-tables/sys-tbl-pg-appendonly.md | 21 +++++++++ .../sys-tbl-pg-attribute-encoding.md | 19 ++++++++ .../sys-tables/sys-tbl-pg-attribute.md | 36 +++++++++++++++ .../sys-tables/sys-tbl-pg-attridef.md | 14 ++++++ .../sys-tables/sys-tbl-pg-auth-members.md | 14 ++++++ .../sys-tables/sys-tbl-pg-authid.md | 31 +++++++++++++ .../sys-tables/sys-tbl-pg-cast.md | 24 ++++++++++ .../sys-tables/sys-tbl-pg-class.md | 45 +++++++++++++++++++ .../sys-tables/sys-tbl-pg-constraint.md | 6 +++ 10 files changed, 226 insertions(+) create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-authid.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-cast.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-class.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md new file mode 100644 index 0000000000..ae8484e742 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md @@ -0,0 +1,16 @@ +--- +title: pg_amproc +--- + +# pg_amproc + +The `pg_amproc` table in the `pg_catalog` schema stores information about support procedures associated with index access method operator classes. There is one row for each support procedure belonging to an operator class. + +|column|type|references|description| +|------|----|----------|-----------| +|`oid`|oid| |Row identifier (hidden attribute; must be explicitly selected)| +|`amprocfamily`|oid|`pg_opfamily.oid`|The operator family this entry is for| +|`amproclefttype`|oid|`pg_type.oid`|Left-hand input data type of associated operator| +|`amprocrighttype`|oid|`pg_type.oid`|Right-hand input data type of associated operator| +|`amprocnum`|smallint| |Support procedure number| +|`amproc`|regproc|`pg_proc.oid`|OID of the procedure| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md new file mode 100644 index 0000000000..bc42880cf4 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md @@ -0,0 +1,21 @@ +--- +title: pg_appendonly +--- + +The `pg_appendonly` table in the `pg_catalog` schema contains information about the storage options and other characteristics of append-optimized tables. + +|column|type|references|description| +|------|----|----------|-----------| +|`relid`|oid| |The table object identifier \(OID\) of the table.| +| `blocksize` | integer | | Block size used for compression of append-optimized tables. Valid values are 8K - 2M. Default is `32K`. | +| `safefswritesize` | integer| | Minimum size for safe write operations to append-optimized tables in a non-mature file system. Commonly set to a multiple of the extent size of the file system; for example, Linux ext3 is `4096` bytes, so a value of `32768` is commonly used. | +| `compresslevel`|smallint| |The compression level, with compression ratio increasing from 1 to 19. When quicklz1 is specified for compresstype, valid values are 1 or 3. With zlib specified, valid values are 1-9. When zstd is specified, valid values are 1-19. | +| `checksum`|boolean| |A checksum value that is stored to compare the state of a block of data at compression time and at scan time to ensure data integrity. | +| `compresstype`|text| |Type of compression used to compress append-optimized tables. Valid values are:
- `none` (no compression)
- `rle_type` (run-length encoding compression)
- `zlib` (gzip compression)
- `zstd` (Zstandard compression)
- `quicklz` | +| `columnstore` | boolean | | `1` for column-oriented storage, `0` for row-oriented storage. | +| `segrelid` | oid | |Table on-disk segment file id. | +| `segfilecount` | smallint| |Number of segment files. | +| `blkdirrelid` | oid | |Block used for on-disk column-oriented table file. | +| `blkdiridxid` | oid | |Block used for on-disk column-oriented index file. | +| `visimaprelid` | oid | |Visibility map for the table. | +| `visimapidxid` | oid | |B-tree index on the visibility map. | diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md new file mode 100644 index 0000000000..5d61cdaab1 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md @@ -0,0 +1,19 @@ +--- +title: pg_attribute_encoding +--- + +# pg_attribute_encoding + +The `pg_attribute_encoding` system catalog table in the `pg_catalog` schema contains column storage information. + +|column|type|modifers|storage|description| +|------|----|--------|-------|-----------| +|`attrelid`|oid|not null|plain|Foreign key to `pg_attribute.attrelid`| +|`attnum`|smallint|not null|plain|Foreign key to `pg_attribute.attnum`| +|`attoptions`|text [ ]| |extended|The options| + +For a column with `filenum = f`, the column files on disk use the suffix `(f - 1)*128 to f*128 - 1`. For example: + +- Column with `filenum = 1` has files `relfilenode`, `relfilenode.1` .. `relfilenode.127`. +- Column with `filenum = 2` has files `relfilenode.128`, `relfilenode.129` .. `relfilenode.255`. +- Column with `filenum = 3` has files `relfilenode.256`, `relfilenode.257` .. `relfilenode.383`. diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md new file mode 100644 index 0000000000..3ee3d62abb --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md @@ -0,0 +1,36 @@ +--- +title: pg_attribute +--- + +The `pg_attribute` table in the `pg_catalog` schema stores information about table columns. There will be exactly one `pg_attribute` row for every column in every table in the database. (There will also be attribute entries for indexes, and all objects that have `pg_class` entries.) The term attribute is equivalent to column. + +In a dropped column's `pg_attribute` entry, `atttypid` is reset to zero, but `attlen` and the other fields copied from `pg_type` are still valid. This arrangement is needed to address the situation where the dropped column's data type was later dropped, and so there is no `pg_type` row anymore. `attlen` and the other fields can be used to interpret the contents of a row of the table. + +|Column|Type|References|Description| +|------|----|----------|-----------| +|`attrelid`|oid|`pg_class.oid`|The table this column belongs to.| +|`attname`|name| |The column name.| +|`atttypid`|oid|`pg_type.oid`|The data type of this column.| +|`attstattarget`|integer| |Controls the level of detail of statistics accumulated for this column by `ANALYZE`. A zero value indicates that no statistics should be collected. A negative value says to use the system default statistics target. The exact meaning of positive values is data type-dependent. For scalar data types, it is both the target number of "most common values" to collect, and the target number of histogram bins to create.| +|`attlen`|smallint| |A copy of `pg_type.typlen` of this column's type.| +|`attnum`|smallint| |The number of the column. Ordinary columns are numbered from 1 up. System columns, such as `ctid`, have (arbitrary) negative numbers.| +|`attndims`|integer| |Number of dimensions, if the column is an array type; otherwise `0`. (Currently, the number of dimensions of an array is not enforced, so any nonzero value effectively means it is an array.)| +|`attcacheoff`|integer| |Always `-1` in storage, but when loaded into a row descriptor in memory this may be updated to cache the offset of the attribute within the row.| +|`atttypmod`|integer| |Records type-specific data supplied at table creation time (for example, the maximum length of a `varchar` column). It is passed to type-specific input functions and length coercion functions. The value will generally be `-1` for types that do not need it.| +|`attbyval`|boolean| |A copy of `pg_type.typbyval` of this column's type.| +|`attstorage`|char| |Normally a copy of `pg_type.typstorage` of this column's type. For TOAST-able data types, this can be altered after column creation to control storage policy.| +|`attalign`|char| |A copy of `pg_type.typalign` of this column's type.| +|`attnotnull`|boolean| |This represents a not-null constraint. | +| `attcompression` | char | | Compression type for this column. Valid values are `n` for none, `r` for run-length encoding, `z` for zlib, `q` for quicklz, and `s` for snappy. | +|`atthasdef`|boolean| |This column has a default expression or generation expression, in which case there will be a corresponding entry in the `pg_attrdef` catalog that actually defines the value. (Check `attgenerated` to determine whether this is a default or a generation expression.)| +|`atthasmissing`|boolean| |This column has a value which is used where the column is entirely missing from the row, as happens when a column is added with a non-volatile `DEFAULT` value after the row is created. The actual value used is stored in the `attmissingval` column.| +|`attidentity`|char| |If a zero byte (''), then not an identity column. Otherwise, `a` = generated always, `d` = generated by default.| +|`attgenerated`|char| |If a zero byte (''), then not a generated column. Otherwise, `s` = stored. (Other values might be added in the future.) | +|`attisdropped`|boolean| |This column has been dropped and is no longer valid. A dropped column is still physically present in the table, but is ignored by the parser and so cannot be accessed via SQL.| +|`attislocal`|boolean| |This column is defined locally in the relation. Note that a column may be locally defined and inherited simultaneously.| +|`attinhcount`|integer| |The number of direct ancestors this column has. A column with a nonzero number of ancestors cannot be dropped nor renamed.| +|`attcollation`|oid|`pg_collation.oid`|The defined collation of the column, or zero if the is not of a collatable data type.| +|`attacl`|aclitem[]| |Column-level access privileges, if any have been granted specifically on this column.| +|`attoptions`|text[]| |Attribute-level options, as "keyword=value" strings.| +|`attfdwoptions`|text[]| |Attribute-level foreign data wrapper options, as "keyword=value" strings.| +|`attmissingval`|anyarray| |This column has a one element array containing the value used when the column is entirely missing from the row, as happens when the column is added with a non-volatile `DEFAULT` value after the row is created. The value is only used when `atthasmissing` is `true`. If there is no value the column is null.| \ No newline at end of file diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md new file mode 100644 index 0000000000..8a1311a24c --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md @@ -0,0 +1,14 @@ +--- +title: pg_attrdef +--- + +# pg_attrdef + +The `pg_attrdef` table in the `pg_catalog` schema stores column default values. The main information about columns is stored in `pg_attribute`. Only columns that explicitly specify a default value (when the table is created or the column is added) will have an entry here. + +|column|type|references|description| +|------|----|----------|-----------| +|`oid`|oid| |The object ID| +|`adrelid`|oid| `pg_class.oid` |The table this column belongs to| +|`adnum`|smallint| `pg_attribute.attnum` |The number of the column| +|`adbin`|pg_node_tree| |The internal representation of the column default value| \ No newline at end of file diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md new file mode 100644 index 0000000000..9015a95613 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md @@ -0,0 +1,14 @@ +--- +title: pg_auth_members +--- + +# pg_auth_members + +The `pg_auth_members` system catalog table in the `pg_catalog` schema shows the membership relations between roles. Any non-circular set of relationships is allowed. Because roles are system-wide, `pg_auth_members` is shared across all databases of a Cloudberry Database system. + +|column|type|references|description| +|------|----|----------|-----------| +|`roleid`|oid|`pg_authid.oid`|ID of the parent-level (group) role| +|`member`|oid|`pg_authid.oid`|ID of a member role| +|`grantor`|oid|`pg_authid.oid`|ID of the role that granted this membership| +|`admin_option`|boolean| |True if role member might grant membership to others| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-authid.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-authid.md new file mode 100644 index 0000000000..036ee59fed --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-authid.md @@ -0,0 +1,31 @@ +--- +title: pg_authid +--- + +# pg_authid + +The `pg_authid` table in the `pg_catalog` schema contains information about database authorization identifiers (roles). A role subsumes the concepts of users and groups. A user is a role with the `rolcanlogin` flag set. Any role (with or without `rolcanlogin`) might have other roles as members. See [`pg_auth_members`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md). + +Because this catalog contains passwords, it must not be publicly readable. `pg_roles` is a publicly readable view on `pg_authid` that blanks out the password field. + +Because user identities are system-wide, `pg_authid` is shared across all databases in a Cloudberry Database system: there is only one copy of `pg_authid` per system, not one per database. + +|column|type|references|description| +|------|----|----------|-----------| +|`oid`|oid| |Row identifier| +|`rolname`|name| |Role name| +|`rolsuper`|boolean| |Role has superuser privileges| +|`rolinherit`|boolean| |Role automatically inherits privileges of roles it is a member of| +|`rolcreaterole`|boolean| |Role might create more roles| +|`rolcreatedb`|boolean| |Role might create databases| +|`rolcanlogin`|boolean| |Role might log in. That is, this role can be given as the initial session authorization identifier| +|`rolreplication`|boolean| |Role is a replication role. That is, this role can initiate streaming replication and set/unset the system backup mode using `pg_start_backup` and `pg_stop_backup`.| +|`rolbypassrls`|boolean| |Roles bypasses every row-level security policy.| +|`rolconnlimit`|int4| |For roles that can log in, this sets maximum number of concurrent connections this role can make. `-1` means no limit| +|`rolpassword`|text| |Password (possibly encrypted); NULL if none. If the password is encrypted, this column will begin with the string `md5` followed by a 32-character hexadecimal MD5 hash. The MD5 hash will be the user's password concatenated to their user name. For example, if user `joe` has password `xyzzy`, Cloudberry Database will store the md5 hash of `xyzzyjoe`. Cloudberry Database assumes that a password that does not follow that format is unencrypted.| +|`rolvaliduntil`|timestamptz| |Password expiry time (only used for password authentication); NULL if no expiration| +|`rolresqueue`|oid| |Object ID of the associated resource queue ID in `pg_resqueue` | +|`rolcreaterextgpfd`|boolean| |Privilege to create read external tables with the `gpfdist` or `gpfdists` protocol| +|`rolcreaterexhttp`|boolean| |Privilege to create read external tables with the `http` protocol| +|`rolcreatewextgpfd`|boolean| |Privilege to create write external tables with the `gpfdist` or `gpfdists` protocol| +|`rolresgroup`|oid| |Object ID of the associated resource group ID in `pg_resgroup` | diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-cast.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-cast.md new file mode 100644 index 0000000000..ce3269f110 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-cast.md @@ -0,0 +1,24 @@ +--- +title: pg_cast +--- + +# pg_cast + +The `pg_cast` table in the `pg_catalog` schema stores data type conversion paths, both built-in paths and those defined with `CREATE CAST`. + +Note that `pg_cast` does not represent every type conversion known to the system, only those that cannot be deduced from some generic rule. For example, casting between a domain and its base type is not explicitly represented in `pg_cast`. Another important exception is that "automatic I/O conversion casts", those performed using a data type's own I/O functions to convert to or from `text` or other string types, are not explicitly represented in `pg_cast`. + +The cast functions listed in `pg_cast` must always take the cast source type as their first argument type, and return the cast destination type as their result type. A cast function can have up to three arguments. The second argument, if present, must be type `integer`; it receives the type modifier associated with the destination type, or `-1` if there is none. The third argument, if present, must be type `boolean`; it receives `true` if the cast is an explicit cast, `false` otherwise. + +It is legitimate to create a `pg_cast` entry in which the source and target types are the same, if the associated function takes more than one argument. Such entries represent 'length coercion functions' that coerce values of the type to be legal for a particular type modifier value. + +When a `pg_cast` entry has different source and target types and a function that takes more than one argument, the entry converts from one type to another and applies a length coercion in a single step. When no such entry is available, coercion to a type that uses a type modifier involves two steps, one to convert between data types and a second to apply the modifier. + +|column|type|references|description| +|------|----|----------|-----------| +|`oid`|oid||The object ID.| +|`castsource`|oid|`pg_type.oid`|OID of the source data type.| +|`casttarget`|oid|`pg_type.oid`|OID of the target data type.| +|`castfunc`|oid|`pg_proc.oid`|The OID of the function to use to perform this cast. Zero is stored if the cast method does not require a function.| +|`castcontext`|char| |Indicates what contexts the cast may be invoked in. `e` means only as an explicit cast (using `CAST` or `::` syntax). `a` means implicitly in assignment to a target column, as well as explicitly. `i` means implicitly in expressions, as well as the other cases*.*| +|`castmethod`|char| |Indicates how the cast is performed:

`f` - The function identified in the `castfunc` field is used.

`i` - The input/output functions are used.

`b` - The types are binary-coercible, and no conversion is required.| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-class.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-class.md new file mode 100644 index 0000000000..4e78ec497c --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-class.md @@ -0,0 +1,45 @@ +--- +title: pg_class +--- + +# pg_class + +The system catalog table `pg_class` catalogs tables and most everything else that has columns or is otherwise similar to a table. This includes indexes (see also `pg_index`), sequences, views, materialized views, composite types, and TOAST tables. Below, when we mean all of these kinds of objects we speak of "relations". Not all columns are meaningful for all relation types. + +|column|type|references|description| +|------|----|----------|-----------| +|`oid`|oid| |Row identifier| +|`relname`|name| |Name of the table, index, view.| +|`relnamespace`|oid| `pg_namespace.oid` |The object identifier of the namespace (schema) that contains this relation| +|`reltype`|oid| `pg_type.oid` |The object identifier of the data type that corresponds to this table's row type, if any (zero for indexes, which have no `pg_type` entry)| +|`reloftype`|oid| `pg_type.oid` |For typed tables, the object identifier of the underlying composite type, zero for all other relations| +|`relowner`|oid|`pg_authid.oid`|Owner of the relation| +|`relam`|oid|`pg_am.oid`|If this is a table or an index, the access method used (heap, B-tree, hash.)| +|`relfilenode`|oid| |Name of the on-disk file of this relation; zero means this is a "mapped" relation whose disk file name is determined by low-level state| +|`reltablespace`|oid|`pg_tablespace.oid`|The tablespace in which this relation is stored. If zero, the database's default tablespace is implied. (Not meaningful if the relation has no on-disk file.)| +|`relpages`|int4| |Size of the on-disk representation of this table in pages (of size `BLCKSZ`). This is only an estimate used by the planner. It is updated by `VACUUM`, `ANALYZE`, and a few DDL commands such as `CREATE INDEX`.| +|`reltuples`|float4| |Number of rows in the table. This is only an estimate used by the planner. It is updated by `VACUUM`, `ANALYZE`, and a few DDL commands such as `CREATE INDEX`.| +|`relallvisible`|int4| |Number of pages that are marked all-visible in the table's visibility map. This is only an estimate used by the planner. It is updated by `VACUUM`, `ANALYZE`, and a few DDL commands such as `CREATE INDEX`.| +|`reltoastrelid`|oid| `pg_class.oid` |The object identifier of the TOAST table associated with this table, `0` if none. The TOAST table stores large attributes "out of line" in a secondary table.| +|`relhasindex`|boolean| |True if this is a table and it has (or recently had) any indexes. | +|`relisshared`|boolean| |True if this table is shared across all databases in the system. Only certain system catalog tables (such as `pg_database`) are shared.| +|`relpersistence`|char| |The type of object persistence: `p` = heap or append-optimized permanent table, `u` = unlogged temporary table, `t` = temporary table.| +|`relkind`|char| |The type of object

`r` = heap or append-optimized ordinary table, `i` = index, `S` = sequence, `t` = TOAST table, `v` = view, `m` = materialized view, `c` = composite type, `f` = foreign table, `p` = partitioned table, `I` = partitioned index, `u` = uncatalogued temporary heap table, `o` = internal append-optimized segment files and EOFs, `b` = append-only block directory, `M` = append-only visibility map.| +|`relnatts`|int2| |Number of user columns in the relation (system columns not counted). There must be this many corresponding entries in `pg_attribute`. See also `pg_attribute.attnum`.| +|`relchecks`|int2| |Number of `CHECK` constraints on the table; see `pg_constraint` catalog.| +|`relhasrules`|boolean| |True if table has (or once had) rules; see `pg_rewrite` catalog.| +|`relhastriggers`|boolean| |True if table has (or once had) triggers.| +|`relhassubclass`|boolean| |True if table has (or once had) any inheritance children.| +|`relrowsecurity`|boolean| |True if table has row level security enabled; see `pg_policy` catalog.| +|`relforcerowsecurity`|boolean| |True if row level security (when enabled) will also apply to the table owner; see `pg_policy` catalog.| +|`relispopulated`|boolean| |True if relation is populated (this is true for all relations other than some materialized views).| +|`relreplident`|char| |Columns used to form "replica identity" for rows: `d` = default (primary key, if any), `n` = nothing, `f` = all columns, `i` = index with `indisreplident` set (same as nothing if the index used has been dropped).| +|`relispartition`|boolean| | True if table or index is a partition.| +|`relrewrite`|oid|`pg_class.oid` | For new relations being written during a DDL operation that requires a table rewrite, this contains the object identifier of the original relation; otherwise 0. That state is only visible internally; this field should never contain anything other than 0 for a user-visible relation.| +|`relfrozenxid`|xid| |All transaction IDs before this one have been replaced with a permanent (frozen) transaction ID in this table. This is used to track whether the table needs to be vacuumed in order to prevent transaction ID wraparound or to allow `pg_xact` to be shrunk.

The value is `0` (`InvalidTransactionId`) if the relation is not a table or if the table does not require vacuuming to prevent transaction ID wraparound. The table still might require vacuuming to reclaim disk space.| +|`relminmxid`|xid| |All multixact IDs before this one have been replaced by a transaction ID in this table. This is used to track whether the table needs to be vacuumed in order to prevent multixact ID wraparound or to allow `pg_multixact` to be shrunk. Zero (`InvalidMultiXactId`) if the relation is not a table.| +|`relacl`|aclitem[]| |Access privileges assigned by `GRANT` and `REVOKE`.| +|`reloptions`|text[]| |Access-method-specific options, as "keyword=value" strings.| +|`relpartbound`|`pg_node_tree`| |If table is a partition (see `relispartition`), internal representation of the partition bound.| + +Several of the Boolean flags in `pg_class` are maintained lazily: they are guaranteed to be true if that's the correct state, but might not be reset to false immediately when the condition is no longer true. For example, `relhasindex` is set by `CREATE INDEX`, but it is never cleared by `DROP INDEX`. Instead, `VACUUM` clears `relhasindex` if it finds the table has no indexes. This arrangement avoids race conditions and improves concurrency. diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md new file mode 100644 index 0000000000..4df0373db5 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md @@ -0,0 +1,6 @@ +--- +title: pg_constraint +--- + +# pg_constraint + From 4380f6b58b66a1842c2e8e084107fe7d56ee2ef6 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Wed, 31 Jan 2024 17:45:42 +0800 Subject: [PATCH 04/13] add --- docs/sys-catalogs/sys-table-overview.md | 20 +++++++++++++++++++ .../sys-tables/sys-tbl-pg-appendonly.md | 2 ++ .../sys-tables/sys-tbl-pg-attribute.md | 2 ++ .../sys-tables/sys-tbl-pg-amproc.md | 5 +++++ .../sys-tables/sys-tbl-pg-appendonly.md | 5 +++++ .../sys-tbl-pg-attribute-encoding.md | 5 +++++ .../sys-tables/sys-tbl-pg-attribute.md | 5 +++++ .../sys-tables/sys-tbl-pg-attridef.md | 5 +++++ .../sys-tables/sys-tbl-pg-auth-members.md | 5 +++++ .../sys-tables/sys-tbl-pg-authid.md | 5 +++++ .../sys-tables/sys-tbl-pg-cast.md | 5 +++++ .../sys-tables/sys-tbl-pg-class.md | 5 +++++ .../sys-tables/sys-tbl-pg-constraint.md | 5 +++++ 13 files changed, 74 insertions(+) create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-authid.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-cast.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-class.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md diff --git a/docs/sys-catalogs/sys-table-overview.md b/docs/sys-catalogs/sys-table-overview.md index c8a222c7d7..dcf009f3cc 100644 --- a/docs/sys-catalogs/sys-table-overview.md +++ b/docs/sys-catalogs/sys-table-overview.md @@ -18,3 +18,23 @@ [`pg_am`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-am.md) [`pg_amop`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-amop.md) + +[`pg_amproc`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md) + +[`pg_appendonly`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md) + +[`pg_attribute_encoding`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md) + +[`pg_attribute`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md) + +[`pg_attridef`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md) + +[`pg_auth_members`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md) + +[`pg_authid`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-authid.md) + +[`pg_cast`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-cast.md) + +[`pg_class`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-class.md) + +[`pg_constraint`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md) \ No newline at end of file diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md index bc42880cf4..8afb83624d 100644 --- a/docs/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md @@ -2,6 +2,8 @@ title: pg_appendonly --- +# pg_appendonly + The `pg_appendonly` table in the `pg_catalog` schema contains information about the storage options and other characteristics of append-optimized tables. |column|type|references|description| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md index 3ee3d62abb..ec393a6cbf 100644 --- a/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md @@ -2,6 +2,8 @@ title: pg_attribute --- +# pg_attribute + The `pg_attribute` table in the `pg_catalog` schema stores information about table columns. There will be exactly one `pg_attribute` row for every column in every table in the database. (There will also be attribute entries for indexes, and all objects that have `pg_class` entries.) The term attribute is equivalent to column. In a dropped column's `pg_attribute` entry, `atttypid` is reset to zero, but `attlen` and the other fields copied from `pg_type` are still valid. This arrangement is needed to address the situation where the dropped column's data type was later dropped, and so there is no `pg_type` row anymore. `attlen` and the other fields can be used to interpret the contents of a row of the table. diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md new file mode 100644 index 0000000000..f85ceec325 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md @@ -0,0 +1,5 @@ +--- +title: pg_amproc +--- + +# pg_amproc diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md new file mode 100644 index 0000000000..c553f8c3ce --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md @@ -0,0 +1,5 @@ +--- +title: pg_appendonly +--- + +# pg_appendonly diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md new file mode 100644 index 0000000000..93eee9b238 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md @@ -0,0 +1,5 @@ +--- +title: pg_attribute_encoding +--- + +# pg_attribute_encoding diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md new file mode 100644 index 0000000000..06e5d82497 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md @@ -0,0 +1,5 @@ +--- +title: pg_attribute +--- + +# pg_attribute diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md new file mode 100644 index 0000000000..0a10bfc548 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md @@ -0,0 +1,5 @@ +--- +title: pg_attrdef +--- + +# pg_attrdef diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md new file mode 100644 index 0000000000..fe2c58dbbc --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md @@ -0,0 +1,5 @@ +--- +title: pg_auth_members +--- + +# pg_auth_members diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-authid.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-authid.md new file mode 100644 index 0000000000..bfca508887 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-authid.md @@ -0,0 +1,5 @@ +--- +title: pg_authid +--- + +# pg_authid diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-cast.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-cast.md new file mode 100644 index 0000000000..0009b37fd7 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-cast.md @@ -0,0 +1,5 @@ +--- +title: pg_cast +--- + +# pg_cast diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-class.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-class.md new file mode 100644 index 0000000000..19593199ce --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-class.md @@ -0,0 +1,5 @@ +--- +title: pg_class +--- + +# pg_class diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md new file mode 100644 index 0000000000..ed157ec2fa --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md @@ -0,0 +1,5 @@ +--- +title: pg_constraint +--- + +# pg_constraint From 9d5bdc03aadc34fb42af0e646cf10256a5096561 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Tue, 30 Jan 2024 15:55:38 +0800 Subject: [PATCH 05/13] docs: add 1st batch of system table docs --- docs/sys-catalogs/sys-table-overview.md | 0 .../sys-tbl-gp-configuration-history.md | 17 ++++++++++ .../sys-tbl-gp-distribution-policy.md | 16 ++++++++++ .../sys-tables/sys-tbl-gp-fastsequence.md | 13 ++++++++ docs/sys-catalogs/sys-tables/sys-tbl-gp-id.md | 14 ++++++++ .../sys-tbl-gp-partition-template.md | 19 +++++++++++ .../sys-tbl-gp-segment-configuration.md | 20 ++++++++++++ .../sys-tbl-gp-version-at-initdb.md | 12 +++++++ .../sys-tables/sys-tbl-pg-aggregate.md | 32 +++++++++++++++++++ docs/sys-catalogs/sys-tables/sys-tbl-pg-am.md | 14 ++++++++ .../sys-tables/sys-tbl-pg-amop.md | 21 ++++++++++++ docs/sys-catalogs/sys-view-overview.md | 0 .../sys-catalogs/sys-table-overview.md | 0 .../sys-tbl-gp-configuration-history.md | 5 +++ .../sys-tbl-gp-distribution-policy.md | 5 +++ .../sys-tables/sys-tbl-gp-fastsequence.md | 5 +++ .../sys-catalogs/sys-tables/sys-tbl-gp-id.md | 5 +++ .../sys-tbl-gp-partition-template.md | 5 +++ .../sys-tbl-gp-segment-configuration.md | 5 +++ .../sys-tbl-gp-version-at-initdb.md | 5 +++ .../sys-tables/sys-tbl-pg-aggregate.md | 5 +++ .../sys-catalogs/sys-tables/sys-tbl-pg-am.md | 5 +++ .../sys-tables/sys-tbl-pg-amop.md | 5 +++ .../current/sys-catalogs/sys-view-overview.md | 0 24 files changed, 228 insertions(+) create mode 100644 docs/sys-catalogs/sys-table-overview.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-gp-id.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-am.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-amop.md create mode 100644 docs/sys-catalogs/sys-view-overview.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-table-overview.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-id.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-am.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-amop.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-view-overview.md diff --git a/docs/sys-catalogs/sys-table-overview.md b/docs/sys-catalogs/sys-table-overview.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md b/docs/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md new file mode 100644 index 0000000000..48be53c3bf --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md @@ -0,0 +1,17 @@ +--- +title: gp_configuration_history +--- + +# gp_configuration_history + +The `gp_configuration_history` table in the `pg_catalog` schema contains information about system changes related to fault detection and recovery operations. The `fts_probe` process logs data to this table, as do certain related management utilities such as `gprecoverseg` and `gpinitsystem`. For example, when you add a new segment and mirror segment to the system, records for these events are logged to `gp_configuration_history`. + +The event descriptions stored in this table may be helpful for troubleshooting serious system issues in collaboration with VMware Support technicians. + +This table is populated only on the coordinator. This table is defined in the `pg_global` tablespace, meaning it is globally shared across all databases in the system. + +|column|type|references|description| +|------|----|----------|-----------| +|`time`|timestamp with time zone| |Timestamp for the event recorded.| +|`dbid`|smallint| `gp_segment_configuration.dbid` |System-assigned ID. The unique identifier of a segment (or coordinator) instance.| +| `desc` |text| |Text description of the event.| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md b/docs/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md new file mode 100644 index 0000000000..03e27fde87 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md @@ -0,0 +1,16 @@ +--- +title: gp_distribution_policy +--- + +# gp_distribution_policy + +The `gp_distribution_policy` table in the `pg_catalog` schema contains information about Greenplum Database tables and their policy for distributing table data across the segments. This table is populated only on the coordinator. This table is not globally shared, meaning each database has its own copy of this table. + +|column|type|references|description| +|------|----|----------|-----------| +|`localoid`|oid| `pg_class.oid` |The table object identifier (OID).| +|`policytype`|char| |The table distribution policy:

`p` - Partitioned policy. Table data is distributed among segment instances.

`r` - Replicated policy. Table data is replicated on each segment instance.| +|`numsegments`|integer| |The number of segment instances on which the table data is distributed.| +|`distkey`|int2vector| `pg_attribute.attnum` |The column number(s) of the distribution column(s).| +|`distclass`|oidvector|`pg_opclass.oid`|The operator class identifier(s) of the distribution column(s).| + diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md b/docs/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md new file mode 100644 index 0000000000..3f36810dea --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md @@ -0,0 +1,13 @@ +--- +title: gp_fastsequence +--- + +# gp_fastsequence + +The `gp_fastsequence` table in the `pg_catalog` schema contains information about append-optimized and column-oriented tables. The `last_sequence` value indicates maximum row number currently used by the table. + +|column|type|references|description| +|------|----|----------|-----------| +|`objid`|oid| `pg_class.oid` |Object id of the `pg_aoseg.pg_aocsseg_*` table used to track append-optimized file segments.| +|`objmod`|bigint| |Object modifier.| +|`last_sequence`|bigint| |The last sequence number used by the object.| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-gp-id.md b/docs/sys-catalogs/sys-tables/sys-tbl-gp-id.md new file mode 100644 index 0000000000..41a383ad23 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-gp-id.md @@ -0,0 +1,14 @@ +--- +title: gp_id +--- + +# gp_id + +The `gp_id` system catalog table in the `pg_catalog` schema identifies the Cloudberry Database system name and number of segments for the system. It also has `local` values for the particular database instance (segment or coordinator) on which the table resides. This table is defined in the `pg_global` tablespace, meaning it is globally shared across all databases in the system. + +|column|type|references|description| +|------|----|----------|-----------| +|`gpname`|name| |The name of this Cloudberry Database system.| +|`numsegments`|smallint| |The number of segments in the Cloudberry Database system.| +|`dbid`|smallint| |The unique identifier of this segment (or coordinator) instance.| +|`content`|smallint| |The ID for the portion of data on this segment instance. A primary and its mirror will have the same content ID.

For a segment the value is from 0-*N-1*, where *N* is the number of segments in Cloudberry Database.

For the coordinator, the value is -1.| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md b/docs/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md new file mode 100644 index 0000000000..d0ad326c19 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md @@ -0,0 +1,19 @@ +--- +title: gp_partition_template +--- + +# gp_partition_template + +The `gp_partition_template` system catalog table in the `pg_catalog` schema describes the relationship between a partitioned table and the sub-partition template defined at each level in the partition hierarchy. + +:::info +Cloudberry Database supports sub-partition templates only for partitioned tables that you create with the classic syntax. +::: + +Each sub-partition template has a dependency on the existence of a template at the next lower level of the hierarchy. + +|column|type|references|description| +|------|----|----------|-----------| +|`relid`| oid | `pg_class.oid` | The object identifier of the root partitioned table. | +|`level`|smallint| | The level of the partition in the hierarchy. The levels are numbered as follows: level `0` is the root partitioned table itself, level `1` represents the direct child/children of the root partitioned table, and so forth. The leaf partitions have the highest level number.| +|`template`| `pg_node_tree` | | Expression representation of the sub-partition template defined for each partition at this level of the hierarchy. | diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md b/docs/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md new file mode 100644 index 0000000000..41f6d72aa5 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md @@ -0,0 +1,20 @@ +--- +title: gp_segment_configuration +--- + +# gp_segment_configuration + +The `gp_segment_configuration` table in the `pg_catalog` schema contains information about mirroring and segment instance configuration. + +|column|type|references|description| +|------|----|----------|-----------| +|`dbid`|smallint| |Unique identifier of a segment (or coordinator) instance.| +|`content`|smallint| |The content identifier for a segment instance. A primary segment instance and its corresponding mirror will always have the same content identifier.

For a segment the value is from 0 to *N*-1, where *N* is the number of primary segments in the system.

For the coordinator, the value is always -1.| +|`role`|char| |The role that a segment is currently running as. Values are `p` (primary) or `m` (mirror).| +|`preferred_role`|char| |The role that a segment was originally assigned at initialization time. Values are `p` (primary) or `m` (mirror).| +|`mode`|char| |The synchronization status of a segment instance with its mirror copy. Values are `s` (Synchronized) or `n` (Not In Sync).

This column always shows `n` for the coordinator segment and `s` for the standby coordinator segment, but these values do not describe the synchronization state for the coordinator segment. Use `gp_stat_replication` to determine the synchronization state between the coordinator and standby coordinator.| +|`status`|char| |The fault status of a segment instance. Values are `u` (up) or `d` (down).| +|`port`|integer| |The TCP port the database server listener process is using.| +|`hostname`|text| |The hostname of a segment host.| +|`address`|text| |The hostname used to access a particular segment instance on a segment host. This value may be the same as `hostname` on systems that do not have per-interface hostnames configured.| +|`datadir`|text| |Segment instance data directory.| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md b/docs/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md new file mode 100644 index 0000000000..9c64fc23f4 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md @@ -0,0 +1,12 @@ +--- +title: gp_version_at_initdb +--- + +# gp_version_at_initdb + +The `gp_version_at_initdb` table in the `pg_catalog` schema is populated on the coordinator and each segment in the Cloudberry Database system. It identifies the version of Cloudberry Database used when the system was first initialized. This table is defined in the `pg_global` tablespace, meaning it is globally shared across all databases in the system. + +|column|type|references|description| +|------|----|----------|-----------| +|`schemaversion`|smallint| |Schema version number.| +|`productversion`|text| |Product version number.| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md new file mode 100644 index 0000000000..371ecf08da --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md @@ -0,0 +1,32 @@ +--- +title: pg_aggregate +--- + +# pg_aggregate + +The `pg_aggregate` table in the `pg_catalog` schema stores information about aggregate functions. An aggregate function is a function that operates on a set of values (typically one column from each row that matches a query condition) and returns a single value computed from all these values. Typical aggregate functions are `sum`, `count`, and `max`. Each entry in `pg_aggregate` is an extension of an entry in `pg_proc`. The `pg_proc` entry carries the aggregate's name, input and output data types, and other information that is similar to ordinary functions. + +|column|type|references|description| +|------|----|----------|-----------| +|`aggfnoid`|regproc|`pg_proc.oid`|OID of the aggregate function| +|`aggkind`|char| |Aggregate kind: `n` for *normal* aggregates, `o` for *ordered-set* aggregates, or `h` for *hypothetical-set* aggregates| +|`aggnumdirectargs`|smallint| |Number of direct (non-aggregated) arguments of an ordered-set or hypothetical-set aggregate, counting a variadic array as one argument. If equal to `pronargs`, the aggregate must be variadic and the variadic array describes the aggregated arguments as well as the final direct arguments. Always zero for normal aggregates.| +|`aggtransfn`|regproc|`pg_proc.oid`|Transition function OID| +|`aggfinalfn`|regproc|`pg_proc.oid`|Final function OID (zero if none)| +|`aggcombinefn`|regproc|`pg_proc.oid`|Combine function OID (zero if none)| +|`aggserialfn`|regproc|`pg_proc.oid`|OID of the serialization function to convert transtype to `bytea` (zero if none)| +|`aggdeserialfn`|regproc|`pg_proc.oid`|OID of the deserialization function to convert `bytea` to transtype (zero if none)| +|`aggmtransfn`|regproc|`pg_proc.oid`|Forward transition function OID for moving-aggregate mode (zero if none)| +|`aggminvtransfn`|regproc|`pg_proc.oid`|Inverse transition function OID for moving-aggregate mode (zero if none)| +|`aggmfinalfn`|regproc|`pg_proc.oid`|Final function OID for moving-aggregate mode (zero if none)| +|`aggfinalextra`|bool| |True to pass extra dummy arguments to `aggfinalfn`| +|`aggmfinalextra`|bool| |True to pass extra dummy arguments to `aggmfinalfn`| +|`aggfinalmodify`|char| |Indicates whether `aggfinalfn` modifies the transition state| +|`aggmfinalmodify`|char| |Indicates whether `aggmfinalfn` modifies the transition state| +|`aggsortop`|oid|`pg_operator.oid`|Associated sort operator OID (zero if none)| +|`aggtranstype`|oid|`pg_type.oid`|Data type of the aggregate function's internal transition (state) data| +|`aggtransspace`|integer| |Approximate average size (in bytes) of the transition state data, or zero to use a default estimate| +|`aggmtranstype`|oid|`pg_type.oid`|Data type of the aggregate function's internal transition (state) data for moving-aggregate mode (zero if none)| +|`aggmtransspace`|integer| |Approximate average size (in bytes) of the transition state data for moving-aggregate mode, or zero to use a default estimate| +|`agginitval`|text| |The initial value of the transition state. This is a text field containing the initial value in its external string representation. If this field is NULL, the transition state value starts out NULL.| +|`aggminitval`|text| |The initial value of the transition state for moving- aggregate mode. This is a text field containing the initial value in its external string representation. If this field is NULL, the transition state value starts out NULL.| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-am.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-am.md new file mode 100644 index 0000000000..8f502ea737 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-am.md @@ -0,0 +1,14 @@ +--- +title: pg_am +--- + +# pg_am + +The `pg_am` table in the `pg_catalog` schema stores information about index access methods. There is one row for each index access method supported by the system. + +|column|type|references|description| +|------|----|----------|-----------| +|`oid`|oid| |Row identifier (hidden attribute; must be explicitly selected)| +|`amname`|name| |Name of the access method| +|`amhandler`|regproc| | OID of a handler function responsible for supplying information about the access method| +|`amtype`|char| |`t` for table (including materialized views), `i` for index| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-amop.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-amop.md new file mode 100644 index 0000000000..f74fd77e25 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-amop.md @@ -0,0 +1,21 @@ +--- +title: pg_amop +--- + +# pg_amop + +The `pg_amop` table in the `pg_catalog` schema stores information about operators associated with index access method operator classes. There is one row for each operator that is a member of an operator class. + +An entry's `amopmethod` must match the `opfmethod` of its containing operator family (including `amopmethod` here is an intentional denormalization of the catalog structure for performance reasons). Also, `amoplefttype` and `amoprighttype` must match the `oprleft` and `oprright` fields of the referenced `pg_operator` entry. + +|column|type|references|description| +|------|----|----------|-----------| +|`oid`|oid| |Row identifier (hidden attribute; must be explicitly selected)| +|`amopfamily`|oid| `pg_opfamily.oid` |The operator family that this entry is for| +|`amoplefttype`|oid|`pg_type.oid`|Left-hand input data type of operator| +|`amoprighttype`|oid|`pg_type.oid`|Right-hand input data type of operator| +|`amopstrategy`|smallint| |Operator strategy number| +|`amoppurpose`|char| |Operator purpose, either `s` for search or `o` for ordering| +|`amopopr`|oid|`pg_operator.oid`|OID of the operator| +|`amopmethod`|oid|`pg_am.oid`|Index access method for the operator family| +|`amopsortfamily`|oid|`pg_opfamily.oid`|If an ordering operator, the B-tree operator family that this entry sorts according to; zero if a search operator| diff --git a/docs/sys-catalogs/sys-view-overview.md b/docs/sys-catalogs/sys-view-overview.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-table-overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-table-overview.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md new file mode 100644 index 0000000000..0b96913b82 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md @@ -0,0 +1,5 @@ +--- +title: gp_configuration_history +--- + +# gp_configuration_history diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md new file mode 100644 index 0000000000..cce473ceba --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md @@ -0,0 +1,5 @@ +--- +title: gp_distribution_policy +--- + +# gp_distribution_policy diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md new file mode 100644 index 0000000000..9e745ea289 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md @@ -0,0 +1,5 @@ +--- +title: gp_fastsequence +--- + +# gp_fastsequence diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-id.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-id.md new file mode 100644 index 0000000000..0b17c0cd90 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-id.md @@ -0,0 +1,5 @@ +--- +title: gp_id +--- + +# gp_id diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md new file mode 100644 index 0000000000..a86bffbeb3 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md @@ -0,0 +1,5 @@ +--- +title: gp_partition_template +--- + +# gp_partition_template diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md new file mode 100644 index 0000000000..6b3c774a4f --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md @@ -0,0 +1,5 @@ +--- +title: gp_segment_configuration +--- + +# gp_segment_configuration diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md new file mode 100644 index 0000000000..6cc6e769e1 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md @@ -0,0 +1,5 @@ +--- +title: gp_version_at_initdb +--- + +# gp_version_at_initdb diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md new file mode 100644 index 0000000000..74835419f4 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md @@ -0,0 +1,5 @@ +--- +title: pg_aggregate +--- + +# pg_aggregate diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-am.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-am.md new file mode 100644 index 0000000000..afcae2a362 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-am.md @@ -0,0 +1,5 @@ +--- +title: pg_am +--- + +# pg_am diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-amop.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-amop.md new file mode 100644 index 0000000000..a6d7a28368 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-amop.md @@ -0,0 +1,5 @@ +--- +title: pg_amop +--- + +# pg_amop diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-view-overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-view-overview.md new file mode 100644 index 0000000000..e69de29bb2 From f0b35796565b568555c6b2130acc95d38ffaa551 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Tue, 30 Jan 2024 16:25:51 +0800 Subject: [PATCH 06/13] Update sys-table-overview.md --- docs/sys-catalogs/sys-table-overview.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/sys-catalogs/sys-table-overview.md b/docs/sys-catalogs/sys-table-overview.md index e69de29bb2..c8a222c7d7 100644 --- a/docs/sys-catalogs/sys-table-overview.md +++ b/docs/sys-catalogs/sys-table-overview.md @@ -0,0 +1,20 @@ + +[`gp_configuration_history`](/docs/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md) + +[`gp_distribution_policy`](/docs/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md) + +[`gp_fastsequence`](/docs/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md) + +[`gp_id`](/docs/sys-catalogs/sys-tables/sys-tbl-gp-id.md) + +[`gp_partition_template`](/docs/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md) + +[`gp_segment_configuration`](/docs/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md) + +[`gp_version_at_initdb`](/docs/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md) + +[`pg_aggregate`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md) + +[`pg_am`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-am.md) + +[`pg_amop`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-amop.md) From b5aa42d601efbb5beeb958346e903999bb83aab1 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Wed, 31 Jan 2024 17:33:01 +0800 Subject: [PATCH 07/13] add more docs --- .../sys-tables/sys-tbl-pg-amproc.md | 16 +++++++ .../sys-tables/sys-tbl-pg-appendonly.md | 21 +++++++++ .../sys-tbl-pg-attribute-encoding.md | 19 ++++++++ .../sys-tables/sys-tbl-pg-attribute.md | 36 +++++++++++++++ .../sys-tables/sys-tbl-pg-attridef.md | 14 ++++++ .../sys-tables/sys-tbl-pg-auth-members.md | 14 ++++++ .../sys-tables/sys-tbl-pg-authid.md | 31 +++++++++++++ .../sys-tables/sys-tbl-pg-cast.md | 24 ++++++++++ .../sys-tables/sys-tbl-pg-class.md | 45 +++++++++++++++++++ .../sys-tables/sys-tbl-pg-constraint.md | 6 +++ 10 files changed, 226 insertions(+) create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-authid.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-cast.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-class.md create mode 100644 docs/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md new file mode 100644 index 0000000000..ae8484e742 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md @@ -0,0 +1,16 @@ +--- +title: pg_amproc +--- + +# pg_amproc + +The `pg_amproc` table in the `pg_catalog` schema stores information about support procedures associated with index access method operator classes. There is one row for each support procedure belonging to an operator class. + +|column|type|references|description| +|------|----|----------|-----------| +|`oid`|oid| |Row identifier (hidden attribute; must be explicitly selected)| +|`amprocfamily`|oid|`pg_opfamily.oid`|The operator family this entry is for| +|`amproclefttype`|oid|`pg_type.oid`|Left-hand input data type of associated operator| +|`amprocrighttype`|oid|`pg_type.oid`|Right-hand input data type of associated operator| +|`amprocnum`|smallint| |Support procedure number| +|`amproc`|regproc|`pg_proc.oid`|OID of the procedure| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md new file mode 100644 index 0000000000..bc42880cf4 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md @@ -0,0 +1,21 @@ +--- +title: pg_appendonly +--- + +The `pg_appendonly` table in the `pg_catalog` schema contains information about the storage options and other characteristics of append-optimized tables. + +|column|type|references|description| +|------|----|----------|-----------| +|`relid`|oid| |The table object identifier \(OID\) of the table.| +| `blocksize` | integer | | Block size used for compression of append-optimized tables. Valid values are 8K - 2M. Default is `32K`. | +| `safefswritesize` | integer| | Minimum size for safe write operations to append-optimized tables in a non-mature file system. Commonly set to a multiple of the extent size of the file system; for example, Linux ext3 is `4096` bytes, so a value of `32768` is commonly used. | +| `compresslevel`|smallint| |The compression level, with compression ratio increasing from 1 to 19. When quicklz1 is specified for compresstype, valid values are 1 or 3. With zlib specified, valid values are 1-9. When zstd is specified, valid values are 1-19. | +| `checksum`|boolean| |A checksum value that is stored to compare the state of a block of data at compression time and at scan time to ensure data integrity. | +| `compresstype`|text| |Type of compression used to compress append-optimized tables. Valid values are:
- `none` (no compression)
- `rle_type` (run-length encoding compression)
- `zlib` (gzip compression)
- `zstd` (Zstandard compression)
- `quicklz` | +| `columnstore` | boolean | | `1` for column-oriented storage, `0` for row-oriented storage. | +| `segrelid` | oid | |Table on-disk segment file id. | +| `segfilecount` | smallint| |Number of segment files. | +| `blkdirrelid` | oid | |Block used for on-disk column-oriented table file. | +| `blkdiridxid` | oid | |Block used for on-disk column-oriented index file. | +| `visimaprelid` | oid | |Visibility map for the table. | +| `visimapidxid` | oid | |B-tree index on the visibility map. | diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md new file mode 100644 index 0000000000..5d61cdaab1 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md @@ -0,0 +1,19 @@ +--- +title: pg_attribute_encoding +--- + +# pg_attribute_encoding + +The `pg_attribute_encoding` system catalog table in the `pg_catalog` schema contains column storage information. + +|column|type|modifers|storage|description| +|------|----|--------|-------|-----------| +|`attrelid`|oid|not null|plain|Foreign key to `pg_attribute.attrelid`| +|`attnum`|smallint|not null|plain|Foreign key to `pg_attribute.attnum`| +|`attoptions`|text [ ]| |extended|The options| + +For a column with `filenum = f`, the column files on disk use the suffix `(f - 1)*128 to f*128 - 1`. For example: + +- Column with `filenum = 1` has files `relfilenode`, `relfilenode.1` .. `relfilenode.127`. +- Column with `filenum = 2` has files `relfilenode.128`, `relfilenode.129` .. `relfilenode.255`. +- Column with `filenum = 3` has files `relfilenode.256`, `relfilenode.257` .. `relfilenode.383`. diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md new file mode 100644 index 0000000000..3ee3d62abb --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md @@ -0,0 +1,36 @@ +--- +title: pg_attribute +--- + +The `pg_attribute` table in the `pg_catalog` schema stores information about table columns. There will be exactly one `pg_attribute` row for every column in every table in the database. (There will also be attribute entries for indexes, and all objects that have `pg_class` entries.) The term attribute is equivalent to column. + +In a dropped column's `pg_attribute` entry, `atttypid` is reset to zero, but `attlen` and the other fields copied from `pg_type` are still valid. This arrangement is needed to address the situation where the dropped column's data type was later dropped, and so there is no `pg_type` row anymore. `attlen` and the other fields can be used to interpret the contents of a row of the table. + +|Column|Type|References|Description| +|------|----|----------|-----------| +|`attrelid`|oid|`pg_class.oid`|The table this column belongs to.| +|`attname`|name| |The column name.| +|`atttypid`|oid|`pg_type.oid`|The data type of this column.| +|`attstattarget`|integer| |Controls the level of detail of statistics accumulated for this column by `ANALYZE`. A zero value indicates that no statistics should be collected. A negative value says to use the system default statistics target. The exact meaning of positive values is data type-dependent. For scalar data types, it is both the target number of "most common values" to collect, and the target number of histogram bins to create.| +|`attlen`|smallint| |A copy of `pg_type.typlen` of this column's type.| +|`attnum`|smallint| |The number of the column. Ordinary columns are numbered from 1 up. System columns, such as `ctid`, have (arbitrary) negative numbers.| +|`attndims`|integer| |Number of dimensions, if the column is an array type; otherwise `0`. (Currently, the number of dimensions of an array is not enforced, so any nonzero value effectively means it is an array.)| +|`attcacheoff`|integer| |Always `-1` in storage, but when loaded into a row descriptor in memory this may be updated to cache the offset of the attribute within the row.| +|`atttypmod`|integer| |Records type-specific data supplied at table creation time (for example, the maximum length of a `varchar` column). It is passed to type-specific input functions and length coercion functions. The value will generally be `-1` for types that do not need it.| +|`attbyval`|boolean| |A copy of `pg_type.typbyval` of this column's type.| +|`attstorage`|char| |Normally a copy of `pg_type.typstorage` of this column's type. For TOAST-able data types, this can be altered after column creation to control storage policy.| +|`attalign`|char| |A copy of `pg_type.typalign` of this column's type.| +|`attnotnull`|boolean| |This represents a not-null constraint. | +| `attcompression` | char | | Compression type for this column. Valid values are `n` for none, `r` for run-length encoding, `z` for zlib, `q` for quicklz, and `s` for snappy. | +|`atthasdef`|boolean| |This column has a default expression or generation expression, in which case there will be a corresponding entry in the `pg_attrdef` catalog that actually defines the value. (Check `attgenerated` to determine whether this is a default or a generation expression.)| +|`atthasmissing`|boolean| |This column has a value which is used where the column is entirely missing from the row, as happens when a column is added with a non-volatile `DEFAULT` value after the row is created. The actual value used is stored in the `attmissingval` column.| +|`attidentity`|char| |If a zero byte (''), then not an identity column. Otherwise, `a` = generated always, `d` = generated by default.| +|`attgenerated`|char| |If a zero byte (''), then not a generated column. Otherwise, `s` = stored. (Other values might be added in the future.) | +|`attisdropped`|boolean| |This column has been dropped and is no longer valid. A dropped column is still physically present in the table, but is ignored by the parser and so cannot be accessed via SQL.| +|`attislocal`|boolean| |This column is defined locally in the relation. Note that a column may be locally defined and inherited simultaneously.| +|`attinhcount`|integer| |The number of direct ancestors this column has. A column with a nonzero number of ancestors cannot be dropped nor renamed.| +|`attcollation`|oid|`pg_collation.oid`|The defined collation of the column, or zero if the is not of a collatable data type.| +|`attacl`|aclitem[]| |Column-level access privileges, if any have been granted specifically on this column.| +|`attoptions`|text[]| |Attribute-level options, as "keyword=value" strings.| +|`attfdwoptions`|text[]| |Attribute-level foreign data wrapper options, as "keyword=value" strings.| +|`attmissingval`|anyarray| |This column has a one element array containing the value used when the column is entirely missing from the row, as happens when the column is added with a non-volatile `DEFAULT` value after the row is created. The value is only used when `atthasmissing` is `true`. If there is no value the column is null.| \ No newline at end of file diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md new file mode 100644 index 0000000000..8a1311a24c --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md @@ -0,0 +1,14 @@ +--- +title: pg_attrdef +--- + +# pg_attrdef + +The `pg_attrdef` table in the `pg_catalog` schema stores column default values. The main information about columns is stored in `pg_attribute`. Only columns that explicitly specify a default value (when the table is created or the column is added) will have an entry here. + +|column|type|references|description| +|------|----|----------|-----------| +|`oid`|oid| |The object ID| +|`adrelid`|oid| `pg_class.oid` |The table this column belongs to| +|`adnum`|smallint| `pg_attribute.attnum` |The number of the column| +|`adbin`|pg_node_tree| |The internal representation of the column default value| \ No newline at end of file diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md new file mode 100644 index 0000000000..9015a95613 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md @@ -0,0 +1,14 @@ +--- +title: pg_auth_members +--- + +# pg_auth_members + +The `pg_auth_members` system catalog table in the `pg_catalog` schema shows the membership relations between roles. Any non-circular set of relationships is allowed. Because roles are system-wide, `pg_auth_members` is shared across all databases of a Cloudberry Database system. + +|column|type|references|description| +|------|----|----------|-----------| +|`roleid`|oid|`pg_authid.oid`|ID of the parent-level (group) role| +|`member`|oid|`pg_authid.oid`|ID of a member role| +|`grantor`|oid|`pg_authid.oid`|ID of the role that granted this membership| +|`admin_option`|boolean| |True if role member might grant membership to others| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-authid.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-authid.md new file mode 100644 index 0000000000..036ee59fed --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-authid.md @@ -0,0 +1,31 @@ +--- +title: pg_authid +--- + +# pg_authid + +The `pg_authid` table in the `pg_catalog` schema contains information about database authorization identifiers (roles). A role subsumes the concepts of users and groups. A user is a role with the `rolcanlogin` flag set. Any role (with or without `rolcanlogin`) might have other roles as members. See [`pg_auth_members`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md). + +Because this catalog contains passwords, it must not be publicly readable. `pg_roles` is a publicly readable view on `pg_authid` that blanks out the password field. + +Because user identities are system-wide, `pg_authid` is shared across all databases in a Cloudberry Database system: there is only one copy of `pg_authid` per system, not one per database. + +|column|type|references|description| +|------|----|----------|-----------| +|`oid`|oid| |Row identifier| +|`rolname`|name| |Role name| +|`rolsuper`|boolean| |Role has superuser privileges| +|`rolinherit`|boolean| |Role automatically inherits privileges of roles it is a member of| +|`rolcreaterole`|boolean| |Role might create more roles| +|`rolcreatedb`|boolean| |Role might create databases| +|`rolcanlogin`|boolean| |Role might log in. That is, this role can be given as the initial session authorization identifier| +|`rolreplication`|boolean| |Role is a replication role. That is, this role can initiate streaming replication and set/unset the system backup mode using `pg_start_backup` and `pg_stop_backup`.| +|`rolbypassrls`|boolean| |Roles bypasses every row-level security policy.| +|`rolconnlimit`|int4| |For roles that can log in, this sets maximum number of concurrent connections this role can make. `-1` means no limit| +|`rolpassword`|text| |Password (possibly encrypted); NULL if none. If the password is encrypted, this column will begin with the string `md5` followed by a 32-character hexadecimal MD5 hash. The MD5 hash will be the user's password concatenated to their user name. For example, if user `joe` has password `xyzzy`, Cloudberry Database will store the md5 hash of `xyzzyjoe`. Cloudberry Database assumes that a password that does not follow that format is unencrypted.| +|`rolvaliduntil`|timestamptz| |Password expiry time (only used for password authentication); NULL if no expiration| +|`rolresqueue`|oid| |Object ID of the associated resource queue ID in `pg_resqueue` | +|`rolcreaterextgpfd`|boolean| |Privilege to create read external tables with the `gpfdist` or `gpfdists` protocol| +|`rolcreaterexhttp`|boolean| |Privilege to create read external tables with the `http` protocol| +|`rolcreatewextgpfd`|boolean| |Privilege to create write external tables with the `gpfdist` or `gpfdists` protocol| +|`rolresgroup`|oid| |Object ID of the associated resource group ID in `pg_resgroup` | diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-cast.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-cast.md new file mode 100644 index 0000000000..ce3269f110 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-cast.md @@ -0,0 +1,24 @@ +--- +title: pg_cast +--- + +# pg_cast + +The `pg_cast` table in the `pg_catalog` schema stores data type conversion paths, both built-in paths and those defined with `CREATE CAST`. + +Note that `pg_cast` does not represent every type conversion known to the system, only those that cannot be deduced from some generic rule. For example, casting between a domain and its base type is not explicitly represented in `pg_cast`. Another important exception is that "automatic I/O conversion casts", those performed using a data type's own I/O functions to convert to or from `text` or other string types, are not explicitly represented in `pg_cast`. + +The cast functions listed in `pg_cast` must always take the cast source type as their first argument type, and return the cast destination type as their result type. A cast function can have up to three arguments. The second argument, if present, must be type `integer`; it receives the type modifier associated with the destination type, or `-1` if there is none. The third argument, if present, must be type `boolean`; it receives `true` if the cast is an explicit cast, `false` otherwise. + +It is legitimate to create a `pg_cast` entry in which the source and target types are the same, if the associated function takes more than one argument. Such entries represent 'length coercion functions' that coerce values of the type to be legal for a particular type modifier value. + +When a `pg_cast` entry has different source and target types and a function that takes more than one argument, the entry converts from one type to another and applies a length coercion in a single step. When no such entry is available, coercion to a type that uses a type modifier involves two steps, one to convert between data types and a second to apply the modifier. + +|column|type|references|description| +|------|----|----------|-----------| +|`oid`|oid||The object ID.| +|`castsource`|oid|`pg_type.oid`|OID of the source data type.| +|`casttarget`|oid|`pg_type.oid`|OID of the target data type.| +|`castfunc`|oid|`pg_proc.oid`|The OID of the function to use to perform this cast. Zero is stored if the cast method does not require a function.| +|`castcontext`|char| |Indicates what contexts the cast may be invoked in. `e` means only as an explicit cast (using `CAST` or `::` syntax). `a` means implicitly in assignment to a target column, as well as explicitly. `i` means implicitly in expressions, as well as the other cases*.*| +|`castmethod`|char| |Indicates how the cast is performed:

`f` - The function identified in the `castfunc` field is used.

`i` - The input/output functions are used.

`b` - The types are binary-coercible, and no conversion is required.| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-class.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-class.md new file mode 100644 index 0000000000..4e78ec497c --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-class.md @@ -0,0 +1,45 @@ +--- +title: pg_class +--- + +# pg_class + +The system catalog table `pg_class` catalogs tables and most everything else that has columns or is otherwise similar to a table. This includes indexes (see also `pg_index`), sequences, views, materialized views, composite types, and TOAST tables. Below, when we mean all of these kinds of objects we speak of "relations". Not all columns are meaningful for all relation types. + +|column|type|references|description| +|------|----|----------|-----------| +|`oid`|oid| |Row identifier| +|`relname`|name| |Name of the table, index, view.| +|`relnamespace`|oid| `pg_namespace.oid` |The object identifier of the namespace (schema) that contains this relation| +|`reltype`|oid| `pg_type.oid` |The object identifier of the data type that corresponds to this table's row type, if any (zero for indexes, which have no `pg_type` entry)| +|`reloftype`|oid| `pg_type.oid` |For typed tables, the object identifier of the underlying composite type, zero for all other relations| +|`relowner`|oid|`pg_authid.oid`|Owner of the relation| +|`relam`|oid|`pg_am.oid`|If this is a table or an index, the access method used (heap, B-tree, hash.)| +|`relfilenode`|oid| |Name of the on-disk file of this relation; zero means this is a "mapped" relation whose disk file name is determined by low-level state| +|`reltablespace`|oid|`pg_tablespace.oid`|The tablespace in which this relation is stored. If zero, the database's default tablespace is implied. (Not meaningful if the relation has no on-disk file.)| +|`relpages`|int4| |Size of the on-disk representation of this table in pages (of size `BLCKSZ`). This is only an estimate used by the planner. It is updated by `VACUUM`, `ANALYZE`, and a few DDL commands such as `CREATE INDEX`.| +|`reltuples`|float4| |Number of rows in the table. This is only an estimate used by the planner. It is updated by `VACUUM`, `ANALYZE`, and a few DDL commands such as `CREATE INDEX`.| +|`relallvisible`|int4| |Number of pages that are marked all-visible in the table's visibility map. This is only an estimate used by the planner. It is updated by `VACUUM`, `ANALYZE`, and a few DDL commands such as `CREATE INDEX`.| +|`reltoastrelid`|oid| `pg_class.oid` |The object identifier of the TOAST table associated with this table, `0` if none. The TOAST table stores large attributes "out of line" in a secondary table.| +|`relhasindex`|boolean| |True if this is a table and it has (or recently had) any indexes. | +|`relisshared`|boolean| |True if this table is shared across all databases in the system. Only certain system catalog tables (such as `pg_database`) are shared.| +|`relpersistence`|char| |The type of object persistence: `p` = heap or append-optimized permanent table, `u` = unlogged temporary table, `t` = temporary table.| +|`relkind`|char| |The type of object

`r` = heap or append-optimized ordinary table, `i` = index, `S` = sequence, `t` = TOAST table, `v` = view, `m` = materialized view, `c` = composite type, `f` = foreign table, `p` = partitioned table, `I` = partitioned index, `u` = uncatalogued temporary heap table, `o` = internal append-optimized segment files and EOFs, `b` = append-only block directory, `M` = append-only visibility map.| +|`relnatts`|int2| |Number of user columns in the relation (system columns not counted). There must be this many corresponding entries in `pg_attribute`. See also `pg_attribute.attnum`.| +|`relchecks`|int2| |Number of `CHECK` constraints on the table; see `pg_constraint` catalog.| +|`relhasrules`|boolean| |True if table has (or once had) rules; see `pg_rewrite` catalog.| +|`relhastriggers`|boolean| |True if table has (or once had) triggers.| +|`relhassubclass`|boolean| |True if table has (or once had) any inheritance children.| +|`relrowsecurity`|boolean| |True if table has row level security enabled; see `pg_policy` catalog.| +|`relforcerowsecurity`|boolean| |True if row level security (when enabled) will also apply to the table owner; see `pg_policy` catalog.| +|`relispopulated`|boolean| |True if relation is populated (this is true for all relations other than some materialized views).| +|`relreplident`|char| |Columns used to form "replica identity" for rows: `d` = default (primary key, if any), `n` = nothing, `f` = all columns, `i` = index with `indisreplident` set (same as nothing if the index used has been dropped).| +|`relispartition`|boolean| | True if table or index is a partition.| +|`relrewrite`|oid|`pg_class.oid` | For new relations being written during a DDL operation that requires a table rewrite, this contains the object identifier of the original relation; otherwise 0. That state is only visible internally; this field should never contain anything other than 0 for a user-visible relation.| +|`relfrozenxid`|xid| |All transaction IDs before this one have been replaced with a permanent (frozen) transaction ID in this table. This is used to track whether the table needs to be vacuumed in order to prevent transaction ID wraparound or to allow `pg_xact` to be shrunk.

The value is `0` (`InvalidTransactionId`) if the relation is not a table or if the table does not require vacuuming to prevent transaction ID wraparound. The table still might require vacuuming to reclaim disk space.| +|`relminmxid`|xid| |All multixact IDs before this one have been replaced by a transaction ID in this table. This is used to track whether the table needs to be vacuumed in order to prevent multixact ID wraparound or to allow `pg_multixact` to be shrunk. Zero (`InvalidMultiXactId`) if the relation is not a table.| +|`relacl`|aclitem[]| |Access privileges assigned by `GRANT` and `REVOKE`.| +|`reloptions`|text[]| |Access-method-specific options, as "keyword=value" strings.| +|`relpartbound`|`pg_node_tree`| |If table is a partition (see `relispartition`), internal representation of the partition bound.| + +Several of the Boolean flags in `pg_class` are maintained lazily: they are guaranteed to be true if that's the correct state, but might not be reset to false immediately when the condition is no longer true. For example, `relhasindex` is set by `CREATE INDEX`, but it is never cleared by `DROP INDEX`. Instead, `VACUUM` clears `relhasindex` if it finds the table has no indexes. This arrangement avoids race conditions and improves concurrency. diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md new file mode 100644 index 0000000000..4df0373db5 --- /dev/null +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md @@ -0,0 +1,6 @@ +--- +title: pg_constraint +--- + +# pg_constraint + From 3665f547ee1d6c64671c3f751080a0f30a9d1f5e Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Wed, 31 Jan 2024 17:45:42 +0800 Subject: [PATCH 08/13] add --- docs/sys-catalogs/sys-table-overview.md | 20 +++++++++++++++++++ .../sys-tables/sys-tbl-pg-appendonly.md | 2 ++ .../sys-tables/sys-tbl-pg-attribute.md | 2 ++ .../sys-tables/sys-tbl-pg-amproc.md | 5 +++++ .../sys-tables/sys-tbl-pg-appendonly.md | 5 +++++ .../sys-tbl-pg-attribute-encoding.md | 5 +++++ .../sys-tables/sys-tbl-pg-attribute.md | 5 +++++ .../sys-tables/sys-tbl-pg-attridef.md | 5 +++++ .../sys-tables/sys-tbl-pg-auth-members.md | 5 +++++ .../sys-tables/sys-tbl-pg-authid.md | 5 +++++ .../sys-tables/sys-tbl-pg-cast.md | 5 +++++ .../sys-tables/sys-tbl-pg-class.md | 5 +++++ .../sys-tables/sys-tbl-pg-constraint.md | 5 +++++ 13 files changed, 74 insertions(+) create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-authid.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-cast.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-class.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md diff --git a/docs/sys-catalogs/sys-table-overview.md b/docs/sys-catalogs/sys-table-overview.md index c8a222c7d7..dcf009f3cc 100644 --- a/docs/sys-catalogs/sys-table-overview.md +++ b/docs/sys-catalogs/sys-table-overview.md @@ -18,3 +18,23 @@ [`pg_am`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-am.md) [`pg_amop`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-amop.md) + +[`pg_amproc`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md) + +[`pg_appendonly`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md) + +[`pg_attribute_encoding`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md) + +[`pg_attribute`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md) + +[`pg_attridef`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md) + +[`pg_auth_members`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md) + +[`pg_authid`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-authid.md) + +[`pg_cast`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-cast.md) + +[`pg_class`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-class.md) + +[`pg_constraint`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md) \ No newline at end of file diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md index bc42880cf4..8afb83624d 100644 --- a/docs/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md @@ -2,6 +2,8 @@ title: pg_appendonly --- +# pg_appendonly + The `pg_appendonly` table in the `pg_catalog` schema contains information about the storage options and other characteristics of append-optimized tables. |column|type|references|description| diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md b/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md index 3ee3d62abb..ec393a6cbf 100644 --- a/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md +++ b/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md @@ -2,6 +2,8 @@ title: pg_attribute --- +# pg_attribute + The `pg_attribute` table in the `pg_catalog` schema stores information about table columns. There will be exactly one `pg_attribute` row for every column in every table in the database. (There will also be attribute entries for indexes, and all objects that have `pg_class` entries.) The term attribute is equivalent to column. In a dropped column's `pg_attribute` entry, `atttypid` is reset to zero, but `attlen` and the other fields copied from `pg_type` are still valid. This arrangement is needed to address the situation where the dropped column's data type was later dropped, and so there is no `pg_type` row anymore. `attlen` and the other fields can be used to interpret the contents of a row of the table. diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md new file mode 100644 index 0000000000..f85ceec325 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md @@ -0,0 +1,5 @@ +--- +title: pg_amproc +--- + +# pg_amproc diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md new file mode 100644 index 0000000000..c553f8c3ce --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md @@ -0,0 +1,5 @@ +--- +title: pg_appendonly +--- + +# pg_appendonly diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md new file mode 100644 index 0000000000..93eee9b238 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md @@ -0,0 +1,5 @@ +--- +title: pg_attribute_encoding +--- + +# pg_attribute_encoding diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md new file mode 100644 index 0000000000..06e5d82497 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md @@ -0,0 +1,5 @@ +--- +title: pg_attribute +--- + +# pg_attribute diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md new file mode 100644 index 0000000000..0a10bfc548 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md @@ -0,0 +1,5 @@ +--- +title: pg_attrdef +--- + +# pg_attrdef diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md new file mode 100644 index 0000000000..fe2c58dbbc --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md @@ -0,0 +1,5 @@ +--- +title: pg_auth_members +--- + +# pg_auth_members diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-authid.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-authid.md new file mode 100644 index 0000000000..bfca508887 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-authid.md @@ -0,0 +1,5 @@ +--- +title: pg_authid +--- + +# pg_authid diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-cast.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-cast.md new file mode 100644 index 0000000000..0009b37fd7 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-cast.md @@ -0,0 +1,5 @@ +--- +title: pg_cast +--- + +# pg_cast diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-class.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-class.md new file mode 100644 index 0000000000..19593199ce --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-class.md @@ -0,0 +1,5 @@ +--- +title: pg_class +--- + +# pg_class diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md new file mode 100644 index 0000000000..ed157ec2fa --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md @@ -0,0 +1,5 @@ +--- +title: pg_constraint +--- + +# pg_constraint From 1e44cfc69a49327ec3135029cf02bada51e40288 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Wed, 19 Feb 2025 16:12:03 +0800 Subject: [PATCH 09/13] simplify file name --- docs/sys-catalogs/sys-table-overview.md | 40 +++++++++---------- ...history.md => gp-configuration-history.md} | 0 ...on-policy.md => gp-distribution-policy.md} | 0 ...-gp-fastsequence.md => gp-fastsequence.md} | 0 .../sys-tables/{sys-tbl-gp-id.md => gp-id.md} | 0 ...n-template.md => gp-partition-template.md} | 0 ...uration.md => gp-segment-configuration.md} | 0 ...n-at-initdb.md => gp-version-at-initdb.md} | 0 ...ys-tbl-pg-aggregate.md => pg-aggregate.md} | 0 .../sys-tables/{sys-tbl-pg-am.md => pg-am.md} | 0 .../{sys-tbl-pg-amop.md => pg-amop.md} | 0 .../{sys-tbl-pg-amproc.md => pg-amproc.md} | 0 ...-tbl-pg-appendonly.md => pg-appendonly.md} | 0 ...e-encoding.md => pg-attribute-encoding.md} | 0 ...ys-tbl-pg-attribute.md => pg-attribute.md} | 0 ...{sys-tbl-pg-attridef.md => pg-attridef.md} | 0 ...-pg-auth-members.md => pg-auth-members.md} | 0 .../{sys-tbl-pg-authid.md => pg-authid.md} | 0 .../{sys-tbl-pg-cast.md => pg-cast.md} | 0 .../{sys-tbl-pg-class.md => pg-class.md} | 0 ...-tbl-pg-constraint.md => pg-constraint.md} | 0 ...history.md => gp-configuration-history.md} | 0 ...on-policy.md => gp-distribution-policy.md} | 0 ...-gp-fastsequence.md => gp-fastsequence.md} | 0 .../sys-tables/{sys-tbl-gp-id.md => gp-id.md} | 0 ...n-template.md => gp-partition-template.md} | 0 ...uration.md => gp-segment-configuration.md} | 0 ...n-at-initdb.md => gp-version-at-initdb.md} | 0 ...ys-tbl-pg-aggregate.md => pg-aggregate.md} | 0 .../sys-tables/{sys-tbl-pg-am.md => pg-am.md} | 0 .../{sys-tbl-pg-amop.md => pg-amop.md} | 0 .../{sys-tbl-pg-amproc.md => pg-amproc.md} | 0 ...-tbl-pg-appendonly.md => pg-appendonly.md} | 0 ...e-encoding.md => pg-attribute-encoding.md} | 0 ...ys-tbl-pg-attribute.md => pg-attribute.md} | 0 ...{sys-tbl-pg-attridef.md => pg-attridef.md} | 0 ...-pg-auth-members.md => pg-auth-members.md} | 0 .../{sys-tbl-pg-authid.md => pg-authid.md} | 0 .../{sys-tbl-pg-cast.md => pg-cast.md} | 0 .../{sys-tbl-pg-class.md => pg-class.md} | 0 ...-tbl-pg-constraint.md => pg-constraint.md} | 0 41 files changed, 20 insertions(+), 20 deletions(-) rename docs/sys-catalogs/sys-tables/{sys-tbl-gp-configuration-history.md => gp-configuration-history.md} (100%) rename docs/sys-catalogs/sys-tables/{sys-tbl-gp-distribution-policy.md => gp-distribution-policy.md} (100%) rename docs/sys-catalogs/sys-tables/{sys-tbl-gp-fastsequence.md => gp-fastsequence.md} (100%) rename docs/sys-catalogs/sys-tables/{sys-tbl-gp-id.md => gp-id.md} (100%) rename docs/sys-catalogs/sys-tables/{sys-tbl-gp-partition-template.md => gp-partition-template.md} (100%) rename docs/sys-catalogs/sys-tables/{sys-tbl-gp-segment-configuration.md => gp-segment-configuration.md} (100%) rename docs/sys-catalogs/sys-tables/{sys-tbl-gp-version-at-initdb.md => gp-version-at-initdb.md} (100%) rename docs/sys-catalogs/sys-tables/{sys-tbl-pg-aggregate.md => pg-aggregate.md} (100%) rename docs/sys-catalogs/sys-tables/{sys-tbl-pg-am.md => pg-am.md} (100%) rename docs/sys-catalogs/sys-tables/{sys-tbl-pg-amop.md => pg-amop.md} (100%) rename docs/sys-catalogs/sys-tables/{sys-tbl-pg-amproc.md => pg-amproc.md} (100%) rename docs/sys-catalogs/sys-tables/{sys-tbl-pg-appendonly.md => pg-appendonly.md} (100%) rename docs/sys-catalogs/sys-tables/{sys-tbl-pg-attribute-encoding.md => pg-attribute-encoding.md} (100%) rename docs/sys-catalogs/sys-tables/{sys-tbl-pg-attribute.md => pg-attribute.md} (100%) rename docs/sys-catalogs/sys-tables/{sys-tbl-pg-attridef.md => pg-attridef.md} (100%) rename docs/sys-catalogs/sys-tables/{sys-tbl-pg-auth-members.md => pg-auth-members.md} (100%) rename docs/sys-catalogs/sys-tables/{sys-tbl-pg-authid.md => pg-authid.md} (100%) rename docs/sys-catalogs/sys-tables/{sys-tbl-pg-cast.md => pg-cast.md} (100%) rename docs/sys-catalogs/sys-tables/{sys-tbl-pg-class.md => pg-class.md} (100%) rename docs/sys-catalogs/sys-tables/{sys-tbl-pg-constraint.md => pg-constraint.md} (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/{sys-tbl-gp-configuration-history.md => gp-configuration-history.md} (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/{sys-tbl-gp-distribution-policy.md => gp-distribution-policy.md} (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/{sys-tbl-gp-fastsequence.md => gp-fastsequence.md} (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/{sys-tbl-gp-id.md => gp-id.md} (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/{sys-tbl-gp-partition-template.md => gp-partition-template.md} (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/{sys-tbl-gp-segment-configuration.md => gp-segment-configuration.md} (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/{sys-tbl-gp-version-at-initdb.md => gp-version-at-initdb.md} (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/{sys-tbl-pg-aggregate.md => pg-aggregate.md} (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/{sys-tbl-pg-am.md => pg-am.md} (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/{sys-tbl-pg-amop.md => pg-amop.md} (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/{sys-tbl-pg-amproc.md => pg-amproc.md} (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/{sys-tbl-pg-appendonly.md => pg-appendonly.md} (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/{sys-tbl-pg-attribute-encoding.md => pg-attribute-encoding.md} (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/{sys-tbl-pg-attribute.md => pg-attribute.md} (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/{sys-tbl-pg-attridef.md => pg-attridef.md} (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/{sys-tbl-pg-auth-members.md => pg-auth-members.md} (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/{sys-tbl-pg-authid.md => pg-authid.md} (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/{sys-tbl-pg-cast.md => pg-cast.md} (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/{sys-tbl-pg-class.md => pg-class.md} (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/{sys-tbl-pg-constraint.md => pg-constraint.md} (100%) diff --git a/docs/sys-catalogs/sys-table-overview.md b/docs/sys-catalogs/sys-table-overview.md index dcf009f3cc..1ff8af4b59 100644 --- a/docs/sys-catalogs/sys-table-overview.md +++ b/docs/sys-catalogs/sys-table-overview.md @@ -1,40 +1,40 @@ -[`gp_configuration_history`](/docs/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md) +[`gp_configuration_history`](/docs/sys-catalogs/sys-tables/gp-configuration-history.md) -[`gp_distribution_policy`](/docs/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md) +[`gp_distribution_policy`](/docs/sys-catalogs/sys-tables/gp-distribution-policy.md) -[`gp_fastsequence`](/docs/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md) +[`gp_fastsequence`](/docs/sys-catalogs/sys-tables/gp-fastsequence.md) -[`gp_id`](/docs/sys-catalogs/sys-tables/sys-tbl-gp-id.md) +[`gp_id`](/docs/sys-catalogs/sys-tables/gp-id.md) -[`gp_partition_template`](/docs/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md) +[`gp_partition_template`](/docs/sys-catalogs/sys-tables/gp-partition-template.md) -[`gp_segment_configuration`](/docs/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md) +[`gp_segment_configuration`](/docs/sys-catalogs/sys-tables/gp-segment-configuration.md) -[`gp_version_at_initdb`](/docs/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md) +[`gp_version_at_initdb`](/docs/sys-catalogs/sys-tables/gp-version-at-initdb.md) -[`pg_aggregate`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md) +[`pg_aggregate`](/docs/sys-catalogs/sys-tables/pg-aggregate.md) -[`pg_am`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-am.md) +[`pg_am`](/docs/sys-catalogs/sys-tables/pg-am.md) -[`pg_amop`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-amop.md) +[`pg_amop`](/docs/sys-catalogs/sys-tables/pg-amop.md) -[`pg_amproc`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md) +[`pg_amproc`](/docs/sys-catalogs/sys-tables/pg-amproc.md) -[`pg_appendonly`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md) +[`pg_appendonly`](/docs/sys-catalogs/sys-tables/pg-appendonly.md) -[`pg_attribute_encoding`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md) +[`pg_attribute_encoding`](/docs/sys-catalogs/sys-tables/pg-attribute-encoding.md) -[`pg_attribute`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md) +[`pg_attribute`](/docs/sys-catalogs/sys-tables/pg-attribute.md) -[`pg_attridef`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md) +[`pg_attridef`](/docs/sys-catalogs/sys-tables/pg-attridef.md) -[`pg_auth_members`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md) +[`pg_auth_members`](/docs/sys-catalogs/sys-tables/pg-auth-members.md) -[`pg_authid`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-authid.md) +[`pg_authid`](/docs/sys-catalogs/sys-tables/pg-authid.md) -[`pg_cast`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-cast.md) +[`pg_cast`](/docs/sys-catalogs/sys-tables/pg-cast.md) -[`pg_class`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-class.md) +[`pg_class`](/docs/sys-catalogs/sys-tables/pg-class.md) -[`pg_constraint`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md) \ No newline at end of file +[`pg_constraint`](/docs/sys-catalogs/sys-tables/pg-constraint.md) \ No newline at end of file diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md b/docs/sys-catalogs/sys-tables/gp-configuration-history.md similarity index 100% rename from docs/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md rename to docs/sys-catalogs/sys-tables/gp-configuration-history.md diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md b/docs/sys-catalogs/sys-tables/gp-distribution-policy.md similarity index 100% rename from docs/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md rename to docs/sys-catalogs/sys-tables/gp-distribution-policy.md diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md b/docs/sys-catalogs/sys-tables/gp-fastsequence.md similarity index 100% rename from docs/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md rename to docs/sys-catalogs/sys-tables/gp-fastsequence.md diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-gp-id.md b/docs/sys-catalogs/sys-tables/gp-id.md similarity index 100% rename from docs/sys-catalogs/sys-tables/sys-tbl-gp-id.md rename to docs/sys-catalogs/sys-tables/gp-id.md diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md b/docs/sys-catalogs/sys-tables/gp-partition-template.md similarity index 100% rename from docs/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md rename to docs/sys-catalogs/sys-tables/gp-partition-template.md diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md b/docs/sys-catalogs/sys-tables/gp-segment-configuration.md similarity index 100% rename from docs/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md rename to docs/sys-catalogs/sys-tables/gp-segment-configuration.md diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md b/docs/sys-catalogs/sys-tables/gp-version-at-initdb.md similarity index 100% rename from docs/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md rename to docs/sys-catalogs/sys-tables/gp-version-at-initdb.md diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md b/docs/sys-catalogs/sys-tables/pg-aggregate.md similarity index 100% rename from docs/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md rename to docs/sys-catalogs/sys-tables/pg-aggregate.md diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-am.md b/docs/sys-catalogs/sys-tables/pg-am.md similarity index 100% rename from docs/sys-catalogs/sys-tables/sys-tbl-pg-am.md rename to docs/sys-catalogs/sys-tables/pg-am.md diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-amop.md b/docs/sys-catalogs/sys-tables/pg-amop.md similarity index 100% rename from docs/sys-catalogs/sys-tables/sys-tbl-pg-amop.md rename to docs/sys-catalogs/sys-tables/pg-amop.md diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md b/docs/sys-catalogs/sys-tables/pg-amproc.md similarity index 100% rename from docs/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md rename to docs/sys-catalogs/sys-tables/pg-amproc.md diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md b/docs/sys-catalogs/sys-tables/pg-appendonly.md similarity index 100% rename from docs/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md rename to docs/sys-catalogs/sys-tables/pg-appendonly.md diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md b/docs/sys-catalogs/sys-tables/pg-attribute-encoding.md similarity index 100% rename from docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md rename to docs/sys-catalogs/sys-tables/pg-attribute-encoding.md diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md b/docs/sys-catalogs/sys-tables/pg-attribute.md similarity index 100% rename from docs/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md rename to docs/sys-catalogs/sys-tables/pg-attribute.md diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md b/docs/sys-catalogs/sys-tables/pg-attridef.md similarity index 100% rename from docs/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md rename to docs/sys-catalogs/sys-tables/pg-attridef.md diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md b/docs/sys-catalogs/sys-tables/pg-auth-members.md similarity index 100% rename from docs/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md rename to docs/sys-catalogs/sys-tables/pg-auth-members.md diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-authid.md b/docs/sys-catalogs/sys-tables/pg-authid.md similarity index 100% rename from docs/sys-catalogs/sys-tables/sys-tbl-pg-authid.md rename to docs/sys-catalogs/sys-tables/pg-authid.md diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-cast.md b/docs/sys-catalogs/sys-tables/pg-cast.md similarity index 100% rename from docs/sys-catalogs/sys-tables/sys-tbl-pg-cast.md rename to docs/sys-catalogs/sys-tables/pg-cast.md diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-class.md b/docs/sys-catalogs/sys-tables/pg-class.md similarity index 100% rename from docs/sys-catalogs/sys-tables/sys-tbl-pg-class.md rename to docs/sys-catalogs/sys-tables/pg-class.md diff --git a/docs/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md b/docs/sys-catalogs/sys-tables/pg-constraint.md similarity index 100% rename from docs/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md rename to docs/sys-catalogs/sys-tables/pg-constraint.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-configuration-history.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-configuration-history.md rename to i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-configuration-history.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-distribution-policy.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-distribution-policy.md rename to i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-distribution-policy.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-fastsequence.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-fastsequence.md rename to i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-fastsequence.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-id.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-id.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-id.md rename to i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-id.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-partition-template.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-partition-template.md rename to i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-partition-template.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-segment-configuration.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-segment-configuration.md rename to i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-segment-configuration.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-version-at-initdb.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-gp-version-at-initdb.md rename to i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-version-at-initdb.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-aggregate.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-aggregate.md rename to i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-aggregate.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-am.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-am.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-am.md rename to i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-am.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-amop.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-amop.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-amop.md rename to i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-amop.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-amproc.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-amproc.md rename to i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-amproc.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-appendonly.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-appendonly.md rename to i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-appendonly.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attribute-encoding.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attribute-encoding.md rename to i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attribute-encoding.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attribute.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attribute.md rename to i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attribute.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attridef.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-attridef.md rename to i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attridef.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-auth-members.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md rename to i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-auth-members.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-authid.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-authid.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-authid.md rename to i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-authid.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-cast.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-cast.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-cast.md rename to i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-cast.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-class.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-class.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-class.md rename to i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-class.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-constraint.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/sys-tbl-pg-constraint.md rename to i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-constraint.md From d223a29636210d77592cfa8ea541c4a1f25732e6 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Wed, 19 Feb 2025 17:27:53 +0800 Subject: [PATCH 10/13] update according to product --- docs/sys-catalogs/sys-table-overview.md | 2 -- docs/sys-catalogs/sys-tables/gp-distribution-policy.md | 1 - docs/sys-catalogs/sys-tables/gp-segment-configuration.md | 1 + docs/sys-catalogs/sys-tables/pg-aggregate.md | 1 + docs/sys-catalogs/sys-tables/pg-appendonly.md | 4 ++-- docs/sys-catalogs/sys-tables/pg-attribute-encoding.md | 1 + docs/sys-catalogs/sys-tables/pg-authid.md | 7 +++++++ docs/sys-catalogs/sys-tables/pg-class.md | 4 ++-- docs/sys-catalogs/sys-tables/pg-constraint.md | 6 ------ .../current/sys-catalogs/sys-tables/pg-constraint.md | 5 ----- 10 files changed, 14 insertions(+), 18 deletions(-) delete mode 100644 docs/sys-catalogs/sys-tables/pg-constraint.md delete mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-constraint.md diff --git a/docs/sys-catalogs/sys-table-overview.md b/docs/sys-catalogs/sys-table-overview.md index 1ff8af4b59..f1900878d0 100644 --- a/docs/sys-catalogs/sys-table-overview.md +++ b/docs/sys-catalogs/sys-table-overview.md @@ -36,5 +36,3 @@ [`pg_cast`](/docs/sys-catalogs/sys-tables/pg-cast.md) [`pg_class`](/docs/sys-catalogs/sys-tables/pg-class.md) - -[`pg_constraint`](/docs/sys-catalogs/sys-tables/pg-constraint.md) \ No newline at end of file diff --git a/docs/sys-catalogs/sys-tables/gp-distribution-policy.md b/docs/sys-catalogs/sys-tables/gp-distribution-policy.md index 03e27fde87..7153b4e314 100644 --- a/docs/sys-catalogs/sys-tables/gp-distribution-policy.md +++ b/docs/sys-catalogs/sys-tables/gp-distribution-policy.md @@ -13,4 +13,3 @@ The `gp_distribution_policy` table in the `pg_catalog` schema contains informati |`numsegments`|integer| |The number of segment instances on which the table data is distributed.| |`distkey`|int2vector| `pg_attribute.attnum` |The column number(s) of the distribution column(s).| |`distclass`|oidvector|`pg_opclass.oid`|The operator class identifier(s) of the distribution column(s).| - diff --git a/docs/sys-catalogs/sys-tables/gp-segment-configuration.md b/docs/sys-catalogs/sys-tables/gp-segment-configuration.md index 41f6d72aa5..a4de4e48b5 100644 --- a/docs/sys-catalogs/sys-tables/gp-segment-configuration.md +++ b/docs/sys-catalogs/sys-tables/gp-segment-configuration.md @@ -18,3 +18,4 @@ The `gp_segment_configuration` table in the `pg_catalog` schema contains informa |`hostname`|text| |The hostname of a segment host.| |`address`|text| |The hostname used to access a particular segment instance on a segment host. This value may be the same as `hostname` on systems that do not have per-interface hostnames configured.| |`datadir`|text| |Segment instance data directory.| +| `warehouseid` | oid | The ID of the warehouse that the segment belongs to. | diff --git a/docs/sys-catalogs/sys-tables/pg-aggregate.md b/docs/sys-catalogs/sys-tables/pg-aggregate.md index 371ecf08da..9aeaa30671 100644 --- a/docs/sys-catalogs/sys-tables/pg-aggregate.md +++ b/docs/sys-catalogs/sys-tables/pg-aggregate.md @@ -30,3 +30,4 @@ The `pg_aggregate` table in the `pg_catalog` schema stores information about agg |`aggmtransspace`|integer| |Approximate average size (in bytes) of the transition state data for moving-aggregate mode, or zero to use a default estimate| |`agginitval`|text| |The initial value of the transition state. This is a text field containing the initial value in its external string representation. If this field is NULL, the transition state value starts out NULL.| |`aggminitval`|text| |The initial value of the transition state for moving- aggregate mode. This is a text field containing the initial value in its external string representation. If this field is NULL, the transition state value starts out NULL.| +| `aggrepsafeexec` | bool | | True if the aggregate is safe to execute in parallel. | diff --git a/docs/sys-catalogs/sys-tables/pg-appendonly.md b/docs/sys-catalogs/sys-tables/pg-appendonly.md index 8afb83624d..5b5ef4f69a 100644 --- a/docs/sys-catalogs/sys-tables/pg-appendonly.md +++ b/docs/sys-catalogs/sys-tables/pg-appendonly.md @@ -10,13 +10,13 @@ The `pg_appendonly` table in the `pg_catalog` schema contains information about |------|----|----------|-----------| |`relid`|oid| |The table object identifier \(OID\) of the table.| | `blocksize` | integer | | Block size used for compression of append-optimized tables. Valid values are 8K - 2M. Default is `32K`. | -| `safefswritesize` | integer| | Minimum size for safe write operations to append-optimized tables in a non-mature file system. Commonly set to a multiple of the extent size of the file system; for example, Linux ext3 is `4096` bytes, so a value of `32768` is commonly used. | | `compresslevel`|smallint| |The compression level, with compression ratio increasing from 1 to 19. When quicklz1 is specified for compresstype, valid values are 1 or 3. With zlib specified, valid values are 1-9. When zstd is specified, valid values are 1-19. | | `checksum`|boolean| |A checksum value that is stored to compare the state of a block of data at compression time and at scan time to ensure data integrity. | -| `compresstype`|text| |Type of compression used to compress append-optimized tables. Valid values are:
- `none` (no compression)
- `rle_type` (run-length encoding compression)
- `zlib` (gzip compression)
- `zstd` (Zstandard compression)
- `quicklz` | +| `compresstype`|name| |Type of compression used to compress append-optimized tables. Valid values are:
- `none` (no compression)
- `rle_type` (run-length encoding compression)
- `zlib` (gzip compression)
- `zstd` (Zstandard compression)
- `quicklz` | | `columnstore` | boolean | | `1` for column-oriented storage, `0` for row-oriented storage. | | `segrelid` | oid | |Table on-disk segment file id. | | `segfilecount` | smallint| |Number of segment files. | +| `version` | smallint | |Version of the append-optimized table. | | `blkdirrelid` | oid | |Block used for on-disk column-oriented table file. | | `blkdiridxid` | oid | |Block used for on-disk column-oriented index file. | | `visimaprelid` | oid | |Visibility map for the table. | diff --git a/docs/sys-catalogs/sys-tables/pg-attribute-encoding.md b/docs/sys-catalogs/sys-tables/pg-attribute-encoding.md index 5d61cdaab1..0fd5f5b589 100644 --- a/docs/sys-catalogs/sys-tables/pg-attribute-encoding.md +++ b/docs/sys-catalogs/sys-tables/pg-attribute-encoding.md @@ -10,6 +10,7 @@ The `pg_attribute_encoding` system catalog table in the `pg_catalog` schema cont |------|----|--------|-------|-----------| |`attrelid`|oid|not null|plain|Foreign key to `pg_attribute.attrelid`| |`attnum`|smallint|not null|plain|Foreign key to `pg_attribute.attnum`| +| `filenum` | smallint | not null | plain | The column file number | |`attoptions`|text [ ]| |extended|The options| For a column with `filenum = f`, the column files on disk use the suffix `(f - 1)*128 to f*128 - 1`. For example: diff --git a/docs/sys-catalogs/sys-tables/pg-authid.md b/docs/sys-catalogs/sys-tables/pg-authid.md index 036ee59fed..250994565d 100644 --- a/docs/sys-catalogs/sys-tables/pg-authid.md +++ b/docs/sys-catalogs/sys-tables/pg-authid.md @@ -22,8 +22,15 @@ Because user identities are system-wide, `pg_authid` is shared across all databa |`rolreplication`|boolean| |Role is a replication role. That is, this role can initiate streaming replication and set/unset the system backup mode using `pg_start_backup` and `pg_stop_backup`.| |`rolbypassrls`|boolean| |Roles bypasses every row-level security policy.| |`rolconnlimit`|int4| |For roles that can log in, this sets maximum number of concurrent connections this role can make. `-1` means no limit| +| `rolenableprofile` | `boolean` | | Role has a profile. | |`rolpassword`|text| |Password (possibly encrypted); NULL if none. If the password is encrypted, this column will begin with the string `md5` followed by a 32-character hexadecimal MD5 hash. The MD5 hash will be the user's password concatenated to their user name. For example, if user `joe` has password `xyzzy`, Cloudberry Database will store the md5 hash of `xyzzyjoe`. Cloudberry Database assumes that a password that does not follow that format is unencrypted.| |`rolvaliduntil`|timestamptz| |Password expiry time (only used for password authentication); NULL if no expiration| +| `rolprofile` | `oid` | | Object ID of the associated profile ID in `pg_profile` | +| `rolaccountstatus` | smallint | | Account status of the role. | +| `rolfailedlogins` | integer | | Number of failed login attempts. | +| `rolpasswordsetat` | timestamptz | | Time when the password was last set. | +| `rollockdate` | timestamptz | | Time when the role was locked. | +| `rolpasswordexpire` | timestamptz | | Time when the password will expire. | |`rolresqueue`|oid| |Object ID of the associated resource queue ID in `pg_resqueue` | |`rolcreaterextgpfd`|boolean| |Privilege to create read external tables with the `gpfdist` or `gpfdists` protocol| |`rolcreaterexhttp`|boolean| |Privilege to create read external tables with the `http` protocol| diff --git a/docs/sys-catalogs/sys-tables/pg-class.md b/docs/sys-catalogs/sys-tables/pg-class.md index 4e78ec497c..82bfb7b5e7 100644 --- a/docs/sys-catalogs/sys-tables/pg-class.md +++ b/docs/sys-catalogs/sys-tables/pg-class.md @@ -15,10 +15,10 @@ The system catalog table `pg_class` catalogs tables and most everything else tha |`reloftype`|oid| `pg_type.oid` |For typed tables, the object identifier of the underlying composite type, zero for all other relations| |`relowner`|oid|`pg_authid.oid`|Owner of the relation| |`relam`|oid|`pg_am.oid`|If this is a table or an index, the access method used (heap, B-tree, hash.)| -|`relfilenode`|oid| |Name of the on-disk file of this relation; zero means this is a "mapped" relation whose disk file name is determined by low-level state| +|`relfilenode`|bigint| |Name of the on-disk file of this relation; zero means this is a "mapped" relation whose disk file name is determined by low-level state| |`reltablespace`|oid|`pg_tablespace.oid`|The tablespace in which this relation is stored. If zero, the database's default tablespace is implied. (Not meaningful if the relation has no on-disk file.)| |`relpages`|int4| |Size of the on-disk representation of this table in pages (of size `BLCKSZ`). This is only an estimate used by the planner. It is updated by `VACUUM`, `ANALYZE`, and a few DDL commands such as `CREATE INDEX`.| -|`reltuples`|float4| |Number of rows in the table. This is only an estimate used by the planner. It is updated by `VACUUM`, `ANALYZE`, and a few DDL commands such as `CREATE INDEX`.| +|`reltuples`|real| |Number of rows in the table. This is only an estimate used by the planner. It is updated by `VACUUM`, `ANALYZE`, and a few DDL commands such as `CREATE INDEX`.| |`relallvisible`|int4| |Number of pages that are marked all-visible in the table's visibility map. This is only an estimate used by the planner. It is updated by `VACUUM`, `ANALYZE`, and a few DDL commands such as `CREATE INDEX`.| |`reltoastrelid`|oid| `pg_class.oid` |The object identifier of the TOAST table associated with this table, `0` if none. The TOAST table stores large attributes "out of line" in a secondary table.| |`relhasindex`|boolean| |True if this is a table and it has (or recently had) any indexes. | diff --git a/docs/sys-catalogs/sys-tables/pg-constraint.md b/docs/sys-catalogs/sys-tables/pg-constraint.md deleted file mode 100644 index 4df0373db5..0000000000 --- a/docs/sys-catalogs/sys-tables/pg-constraint.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: pg_constraint ---- - -# pg_constraint - diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-constraint.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-constraint.md deleted file mode 100644 index ed157ec2fa..0000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-constraint.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: pg_constraint ---- - -# pg_constraint From c00a8b0ccbdeb1287f95d4153afd53d05dfdc63a Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Thu, 20 Feb 2025 10:42:47 +0800 Subject: [PATCH 11/13] add a few translation --- .../sys-tables/gp-distribution-policy.md | 2 +- docs/sys-catalogs/sys-tables/gp-id.md | 8 ++-- .../sys-tables/gp-partition-template.md | 2 +- .../sys-tables/gp-version-at-initdb.md | 2 +- .../sys-tables/pg-auth-members.md | 2 +- docs/sys-catalogs/sys-tables/pg-authid.md | 4 +- .../sys-catalogs/sys-table-overview.md | 38 ++++++++++++++++++ .../sys-tables/gp-configuration-history.md | 12 ++++++ .../sys-tables/gp-distribution-policy.md | 10 +++++ .../sys-tables/gp-fastsequence.md | 8 ++++ .../current/sys-catalogs/sys-tables/gp-id.md | 9 +++++ .../sys-tables/gp-partition-template.md | 14 +++++++ .../sys-tables/gp-segment-configuration.md | 16 ++++++++ .../sys-tables/gp-version-at-initdb.md | 7 ++++ .../sys-catalogs/sys-tables/pg-aggregate.md | 28 +++++++++++++ .../current/sys-catalogs/sys-tables/pg-am.md | 9 +++++ .../sys-catalogs/sys-tables/pg-amop.md | 16 ++++++++ .../sys-catalogs/sys-tables/pg-amproc.md | 11 +++++ .../sys-catalogs/sys-tables/pg-appendonly.md | 18 +++++++++ .../sys-tables/pg-attribute-encoding.md | 15 +++++++ .../sys-catalogs/sys-tables/pg-attribute.md | 33 +++++++++++++++ .../sys-catalogs/sys-tables/pg-attridef.md | 9 +++++ .../sys-tables/pg-auth-members.md | 9 +++++ .../sys-catalogs/sys-tables/pg-authid.md | 33 +++++++++++++++ .../sys-catalogs/sys-tables/pg-cast.md | 19 +++++++++ .../sys-catalogs/sys-tables/pg-class.md | 40 +++++++++++++++++++ 26 files changed, 364 insertions(+), 10 deletions(-) diff --git a/docs/sys-catalogs/sys-tables/gp-distribution-policy.md b/docs/sys-catalogs/sys-tables/gp-distribution-policy.md index 7153b4e314..70066b2376 100644 --- a/docs/sys-catalogs/sys-tables/gp-distribution-policy.md +++ b/docs/sys-catalogs/sys-tables/gp-distribution-policy.md @@ -4,7 +4,7 @@ title: gp_distribution_policy # gp_distribution_policy -The `gp_distribution_policy` table in the `pg_catalog` schema contains information about Greenplum Database tables and their policy for distributing table data across the segments. This table is populated only on the coordinator. This table is not globally shared, meaning each database has its own copy of this table. +The `gp_distribution_policy` table in the `pg_catalog` schema contains information about Apache Cloudberry tables and their policy for distributing table data across the segments. This table is populated only on the coordinator. This table is not globally shared, meaning each database has its own copy of this table. |column|type|references|description| |------|----|----------|-----------| diff --git a/docs/sys-catalogs/sys-tables/gp-id.md b/docs/sys-catalogs/sys-tables/gp-id.md index 41a383ad23..0217497b60 100644 --- a/docs/sys-catalogs/sys-tables/gp-id.md +++ b/docs/sys-catalogs/sys-tables/gp-id.md @@ -4,11 +4,11 @@ title: gp_id # gp_id -The `gp_id` system catalog table in the `pg_catalog` schema identifies the Cloudberry Database system name and number of segments for the system. It also has `local` values for the particular database instance (segment or coordinator) on which the table resides. This table is defined in the `pg_global` tablespace, meaning it is globally shared across all databases in the system. +The `gp_id` system catalog table in the `pg_catalog` schema identifies the Apache Cloudberry system name and number of segments for the system. It also has `local` values for the particular database instance (segment or coordinator) on which the table resides. This table is defined in the `pg_global` tablespace, meaning it is globally shared across all databases in the system. |column|type|references|description| |------|----|----------|-----------| -|`gpname`|name| |The name of this Cloudberry Database system.| -|`numsegments`|smallint| |The number of segments in the Cloudberry Database system.| +|`gpname`|name| |The name of this Apache Cloudberry system.| +|`numsegments`|smallint| |The number of segments in the Apache Cloudberry system.| |`dbid`|smallint| |The unique identifier of this segment (or coordinator) instance.| -|`content`|smallint| |The ID for the portion of data on this segment instance. A primary and its mirror will have the same content ID.

For a segment the value is from 0-*N-1*, where *N* is the number of segments in Cloudberry Database.

For the coordinator, the value is -1.| +|`content`|smallint| |The ID for the portion of data on this segment instance. A primary and its mirror will have the same content ID.

For a segment the value is from 0-*N-1*, where *N* is the number of segments in Apache Cloudberry.

For the coordinator, the value is -1.| diff --git a/docs/sys-catalogs/sys-tables/gp-partition-template.md b/docs/sys-catalogs/sys-tables/gp-partition-template.md index d0ad326c19..1e762a58d6 100644 --- a/docs/sys-catalogs/sys-tables/gp-partition-template.md +++ b/docs/sys-catalogs/sys-tables/gp-partition-template.md @@ -7,7 +7,7 @@ title: gp_partition_template The `gp_partition_template` system catalog table in the `pg_catalog` schema describes the relationship between a partitioned table and the sub-partition template defined at each level in the partition hierarchy. :::info -Cloudberry Database supports sub-partition templates only for partitioned tables that you create with the classic syntax. +Apache Cloudberry supports sub-partition templates only for partitioned tables that you create with the classic syntax. ::: Each sub-partition template has a dependency on the existence of a template at the next lower level of the hierarchy. diff --git a/docs/sys-catalogs/sys-tables/gp-version-at-initdb.md b/docs/sys-catalogs/sys-tables/gp-version-at-initdb.md index 9c64fc23f4..df1c084f54 100644 --- a/docs/sys-catalogs/sys-tables/gp-version-at-initdb.md +++ b/docs/sys-catalogs/sys-tables/gp-version-at-initdb.md @@ -4,7 +4,7 @@ title: gp_version_at_initdb # gp_version_at_initdb -The `gp_version_at_initdb` table in the `pg_catalog` schema is populated on the coordinator and each segment in the Cloudberry Database system. It identifies the version of Cloudberry Database used when the system was first initialized. This table is defined in the `pg_global` tablespace, meaning it is globally shared across all databases in the system. +The `gp_version_at_initdb` table in the `pg_catalog` schema is populated on the coordinator and each segment in the Apache Cloudberry system. It identifies the version of Apache Cloudberry used when the system was first initialized. This table is defined in the `pg_global` tablespace, meaning it is globally shared across all databases in the system. |column|type|references|description| |------|----|----------|-----------| diff --git a/docs/sys-catalogs/sys-tables/pg-auth-members.md b/docs/sys-catalogs/sys-tables/pg-auth-members.md index 9015a95613..14c9883b09 100644 --- a/docs/sys-catalogs/sys-tables/pg-auth-members.md +++ b/docs/sys-catalogs/sys-tables/pg-auth-members.md @@ -4,7 +4,7 @@ title: pg_auth_members # pg_auth_members -The `pg_auth_members` system catalog table in the `pg_catalog` schema shows the membership relations between roles. Any non-circular set of relationships is allowed. Because roles are system-wide, `pg_auth_members` is shared across all databases of a Cloudberry Database system. +The `pg_auth_members` system catalog table in the `pg_catalog` schema shows the membership relations between roles. Any non-circular set of relationships is allowed. Because roles are system-wide, `pg_auth_members` is shared across all databases of a Apache Cloudberry system. |column|type|references|description| |------|----|----------|-----------| diff --git a/docs/sys-catalogs/sys-tables/pg-authid.md b/docs/sys-catalogs/sys-tables/pg-authid.md index 250994565d..ccf319cab0 100644 --- a/docs/sys-catalogs/sys-tables/pg-authid.md +++ b/docs/sys-catalogs/sys-tables/pg-authid.md @@ -8,7 +8,7 @@ The `pg_authid` table in the `pg_catalog` schema contains information about data Because this catalog contains passwords, it must not be publicly readable. `pg_roles` is a publicly readable view on `pg_authid` that blanks out the password field. -Because user identities are system-wide, `pg_authid` is shared across all databases in a Cloudberry Database system: there is only one copy of `pg_authid` per system, not one per database. +Because user identities are system-wide, `pg_authid` is shared across all databases in a Apache Cloudberry system: there is only one copy of `pg_authid` per system, not one per database. |column|type|references|description| |------|----|----------|-----------| @@ -23,7 +23,7 @@ Because user identities are system-wide, `pg_authid` is shared across all databa |`rolbypassrls`|boolean| |Roles bypasses every row-level security policy.| |`rolconnlimit`|int4| |For roles that can log in, this sets maximum number of concurrent connections this role can make. `-1` means no limit| | `rolenableprofile` | `boolean` | | Role has a profile. | -|`rolpassword`|text| |Password (possibly encrypted); NULL if none. If the password is encrypted, this column will begin with the string `md5` followed by a 32-character hexadecimal MD5 hash. The MD5 hash will be the user's password concatenated to their user name. For example, if user `joe` has password `xyzzy`, Cloudberry Database will store the md5 hash of `xyzzyjoe`. Cloudberry Database assumes that a password that does not follow that format is unencrypted.| +|`rolpassword`|text| |Password (possibly encrypted); NULL if none. If the password is encrypted, this column will begin with the string `md5` followed by a 32-character hexadecimal MD5 hash. The MD5 hash will be the user's password concatenated to their user name. For example, if user `joe` has password `xyzzy`, Apache Cloudberry will store the md5 hash of `xyzzyjoe`. Apache Cloudberry assumes that a password that does not follow that format is unencrypted.| |`rolvaliduntil`|timestamptz| |Password expiry time (only used for password authentication); NULL if no expiration| | `rolprofile` | `oid` | | Object ID of the associated profile ID in `pg_profile` | | `rolaccountstatus` | smallint | | Account status of the role. | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-table-overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-table-overview.md index e69de29bb2..f1900878d0 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-table-overview.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-table-overview.md @@ -0,0 +1,38 @@ + +[`gp_configuration_history`](/docs/sys-catalogs/sys-tables/gp-configuration-history.md) + +[`gp_distribution_policy`](/docs/sys-catalogs/sys-tables/gp-distribution-policy.md) + +[`gp_fastsequence`](/docs/sys-catalogs/sys-tables/gp-fastsequence.md) + +[`gp_id`](/docs/sys-catalogs/sys-tables/gp-id.md) + +[`gp_partition_template`](/docs/sys-catalogs/sys-tables/gp-partition-template.md) + +[`gp_segment_configuration`](/docs/sys-catalogs/sys-tables/gp-segment-configuration.md) + +[`gp_version_at_initdb`](/docs/sys-catalogs/sys-tables/gp-version-at-initdb.md) + +[`pg_aggregate`](/docs/sys-catalogs/sys-tables/pg-aggregate.md) + +[`pg_am`](/docs/sys-catalogs/sys-tables/pg-am.md) + +[`pg_amop`](/docs/sys-catalogs/sys-tables/pg-amop.md) + +[`pg_amproc`](/docs/sys-catalogs/sys-tables/pg-amproc.md) + +[`pg_appendonly`](/docs/sys-catalogs/sys-tables/pg-appendonly.md) + +[`pg_attribute_encoding`](/docs/sys-catalogs/sys-tables/pg-attribute-encoding.md) + +[`pg_attribute`](/docs/sys-catalogs/sys-tables/pg-attribute.md) + +[`pg_attridef`](/docs/sys-catalogs/sys-tables/pg-attridef.md) + +[`pg_auth_members`](/docs/sys-catalogs/sys-tables/pg-auth-members.md) + +[`pg_authid`](/docs/sys-catalogs/sys-tables/pg-authid.md) + +[`pg_cast`](/docs/sys-catalogs/sys-tables/pg-cast.md) + +[`pg_class`](/docs/sys-catalogs/sys-tables/pg-class.md) diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-configuration-history.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-configuration-history.md index 0b96913b82..d3f5e1b8eb 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-configuration-history.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-configuration-history.md @@ -3,3 +3,15 @@ title: gp_configuration_history --- # gp_configuration_history + +`gp_configuration_history` 表位于 `pg_catalog` 模式中,用于存储与故障检测和恢复操作相关的系统变更信息。`fts_probe` 进程会将数据写入该表,同时一些管理工具(如 `gprecoverseg` 和 `gpinitsystem`)也会向表中记录数据。例如,当用户向系统中添加新的 Segment 或镜像 Segment 时,相关事件会被记录到 `gp_configuration_history` 表中。 + +技术支持工程师在排查系统问题时,可以参考该表中存储的事件描述。 + +需要注意的是,该表仅在 Coordinator 节点上填充数据,并且定义在 `pg_global` 表空间中,因此它在系统的所有数据库之间全局共享。 + +| 列名 | 类型 | 引用 | 描述 | +|-----------|--------------------------|-----------------------------------|----------------------------------------| +| `time` | timestamp with time zone | | 事件记录的时间戳。 | +| `dbid` | smallint | `gp_segment_configuration.dbid` | 系统分配的 ID,用于唯一标识 Segment 或 Coordinator 节点实例。 | +| `desc` | text | | 事件的文本描述。 | \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-distribution-policy.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-distribution-policy.md index cce473ceba..4bba496b6c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-distribution-policy.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-distribution-policy.md @@ -3,3 +3,13 @@ title: gp_distribution_policy --- # gp_distribution_policy + +`gp_distribution_policy` 表位于 `pg_catalog` 模式中,记录了 Apache Cloudberry 表的相关信息以及数据在 Segment 节点间的分布策略。该表仅在 Coordinator 节点上更新,且不全局共享,因此每个数据库都会拥有该表的独立副本。 + +| 列名 | 类型 | 引用 | 描述 | +|--------------|------------|-----------------------|----------------------------------------------------------------------| +| `localoid` | oid | `pg_class.oid` | 表的对象标识符 (OID)。 | +| `policytype` | char | | 表的分布策略:

`p` - 分区策略。表数据分布在多个 Segment 实例上。

`r` - 复制策略。表数据会在每个 Segment 实例上复制。 | +| `numsegments`| integer | | 表数据分布的 Segment 实例数量。 | +| `distkey` | int2vector | `pg_attribute.attnum` | 分布列的列编号。 | +| `distclass` | oidvector | `pg_opclass.oid` | 分布列的操作符类标识符。 | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-fastsequence.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-fastsequence.md index 9e745ea289..35a62c7893 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-fastsequence.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-fastsequence.md @@ -3,3 +3,11 @@ title: gp_fastsequence --- # gp_fastsequence + +`gp_fastsequence` 表位于 `pg_catalog` 模式中,用于存储与追加优化表(append-optimized 表,或 AO 表)和列式表相关的信息。`last_sequence` 值表示该表当前使用的最大行号。 + +| 列名 | 类型 | 引用 | 描述 | +|----------------|--------|-----------------------|----------------------------------------------------------------------| +| `objid` | oid | `pg_class.oid` | 用于追踪追加优化文件 segment 的 `pg_aoseg.pg_aocsseg_*` 表的对象 ID。 | +| `objmod` | bigint | | 对象修饰符。 | +| `last_sequence`| bigint | | 该对象最后使用的序列号。 | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-id.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-id.md index 0b17c0cd90..c898094c81 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-id.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-id.md @@ -3,3 +3,12 @@ title: gp_id --- # gp_id + +`gp_id` 系统目录表位于 `pg_catalog` 模式中,用于标识 Apache Cloudberry 系统的名称和 Segment 数量。它还包含该表所在的特定数据库实例(Segment 或 Coordinator)的本地信息。该表定义在 `pg_global` 表空间中,意味着它在系统的所有数据库中全局共享。 + +| 列名 | 类型 | 引用 | 描述 | +|---------------|----------|------|----------------------------------------------------------------------| +| `gpname` | name | | 当前 Apache Cloudberry 系统的名称。 | +| `numsegments`| smallint | | Apache Cloudberry 系统中的 Segment 数量。 | +| `dbid` | smallint | | 当前 Segment(或 Coordinator)实例的唯一标识符。 | +| `content` | smallint | | 当前 Segment 实例上数据部分的 ID。主 Segment 和其镜像会共享相同的 content ID。

对于 Segment,值的范围为 0 到 *N-1*,其中 *N* 是 Apache Cloudberry 系统中的 Segment 数量。

对于 Coordinator,值为 -1。 | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-partition-template.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-partition-template.md index a86bffbeb3..11daf98305 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-partition-template.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-partition-template.md @@ -3,3 +3,17 @@ title: gp_partition_template --- # gp_partition_template + +`gp_partition_template` 系统目录表位于 `pg_catalog` 模式中,用于描述分区表与分区层次结构中每一级定义的子分区模板之间的关系。 + +:::info +Apache Cloudberry 仅支持通过经典语法创建的分区表使用子分区模板。 +::: + +每个子分区模板的存在都依赖于下一层级模板的定义。 + +| 列名 | 类型 | 引用 | 描述 | +|------------|-----------------|-----------------------|----------------------------------------------------------------------| +| `relid` | oid | `pg_class.oid` | 根分区表的对象标识符。 | +| `level` | smallint | | 分区在层次结构中的级别。级别编号规则如下:级别 `0` 表示根分区表本身,级别 `1` 表示根分区表的直接子分区,依此类推。叶子分区的级别编号最高。 | +| `template` | `pg_node_tree` | | 该层级分区定义的子分区模板的表达式表示。 | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-segment-configuration.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-segment-configuration.md index 6b3c774a4f..e7c26cfc60 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-segment-configuration.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-segment-configuration.md @@ -3,3 +3,19 @@ title: gp_segment_configuration --- # gp_segment_configuration + +`gp_segment_configuration` 表位于 `pg_catalog` 模式中,用于存储镜像和 Segment 实例的配置信息。 + +| 列名 | 类型 | 引用 | 描述 | +|------------------|----------|------|----------------------------------------------------------------------| +| `dbid` | smallint | | Segment(或 Coordinator)实例的唯一标识符。 | +| `content` | smallint | | Segment 实例的内容标识符。主 Segment 实例及其对应的镜像始终具有相同的内容标识符。

对于 Segment,值的范围为 0 到 *N*-1,其中 *N* 是系统中主 Segment 的数量。

对于 Coordinator,值始终为 -1。 | +| `role` | char | | Segment 当前运行的角色。取值为 `p`(主)或 `m`(镜像)。 | +| `preferred_role`| char | | Segment 在初始化时被分配的角色。取值为 `p`(主)或 `m`(镜像)。 | +| `mode` | char | | Segment 实例与其镜像副本的同步状态。取值为 `s`(已同步)或 `n`(未同步)。

对于 Coordinator Segment,该列始终显示 `n`;对于备用 Coordinator Segment,始终显示 `s`。但这些值并不表示 Coordinator Segment 的同步状态。要确定 Coordinator 和备用 Coordinator 之间的同步状态,请使用 `gp_stat_replication`。 | +| `status` | char | | Segment 实例的故障状态。取值为 `u`(正常)或 `d`(故障)。 | +| `port` | integer | | 数据库服务器监听进程使用的 TCP 端口。 | +| `hostname` | text | | Segment 主机的主机名。 | +| `address` | text | | 用于访问 Segment 主机上特定 Segment 实例的主机名。在未配置基于接口的主机名的系统中,该值可能与 `hostname` 相同。 | +| `datadir` | text | | Segment 实例的数据目录。 | +| `warehouseid` | oid | | Segment 所属仓库的 ID。 | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-version-at-initdb.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-version-at-initdb.md index 6cc6e769e1..f90cfd7a70 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-version-at-initdb.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/gp-version-at-initdb.md @@ -3,3 +3,10 @@ title: gp_version_at_initdb --- # gp_version_at_initdb + +`gp_version_at_initdb` 表位于 `pg_catalog` 模式中,在 Apache Cloudberry 系统的 Coordinator 和每个 Segment 上都有数据填充。它记录了系统首次初始化时使用的 Apache Cloudberry 版本。该表定义在 `pg_global` 表空间中,意味着它在系统的所有数据库中全局共享。 + +| 列名 | 类型 | 引用 | 描述 | +|------------------|----------|------|------------------------| +| `schemaversion` | smallint | | 数据库模式的版本号。 | +| `productversion` | text | | 产品的版本号。 | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-aggregate.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-aggregate.md index 74835419f4..9aeaa30671 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-aggregate.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-aggregate.md @@ -3,3 +3,31 @@ title: pg_aggregate --- # pg_aggregate + +The `pg_aggregate` table in the `pg_catalog` schema stores information about aggregate functions. An aggregate function is a function that operates on a set of values (typically one column from each row that matches a query condition) and returns a single value computed from all these values. Typical aggregate functions are `sum`, `count`, and `max`. Each entry in `pg_aggregate` is an extension of an entry in `pg_proc`. The `pg_proc` entry carries the aggregate's name, input and output data types, and other information that is similar to ordinary functions. + +|column|type|references|description| +|------|----|----------|-----------| +|`aggfnoid`|regproc|`pg_proc.oid`|OID of the aggregate function| +|`aggkind`|char| |Aggregate kind: `n` for *normal* aggregates, `o` for *ordered-set* aggregates, or `h` for *hypothetical-set* aggregates| +|`aggnumdirectargs`|smallint| |Number of direct (non-aggregated) arguments of an ordered-set or hypothetical-set aggregate, counting a variadic array as one argument. If equal to `pronargs`, the aggregate must be variadic and the variadic array describes the aggregated arguments as well as the final direct arguments. Always zero for normal aggregates.| +|`aggtransfn`|regproc|`pg_proc.oid`|Transition function OID| +|`aggfinalfn`|regproc|`pg_proc.oid`|Final function OID (zero if none)| +|`aggcombinefn`|regproc|`pg_proc.oid`|Combine function OID (zero if none)| +|`aggserialfn`|regproc|`pg_proc.oid`|OID of the serialization function to convert transtype to `bytea` (zero if none)| +|`aggdeserialfn`|regproc|`pg_proc.oid`|OID of the deserialization function to convert `bytea` to transtype (zero if none)| +|`aggmtransfn`|regproc|`pg_proc.oid`|Forward transition function OID for moving-aggregate mode (zero if none)| +|`aggminvtransfn`|regproc|`pg_proc.oid`|Inverse transition function OID for moving-aggregate mode (zero if none)| +|`aggmfinalfn`|regproc|`pg_proc.oid`|Final function OID for moving-aggregate mode (zero if none)| +|`aggfinalextra`|bool| |True to pass extra dummy arguments to `aggfinalfn`| +|`aggmfinalextra`|bool| |True to pass extra dummy arguments to `aggmfinalfn`| +|`aggfinalmodify`|char| |Indicates whether `aggfinalfn` modifies the transition state| +|`aggmfinalmodify`|char| |Indicates whether `aggmfinalfn` modifies the transition state| +|`aggsortop`|oid|`pg_operator.oid`|Associated sort operator OID (zero if none)| +|`aggtranstype`|oid|`pg_type.oid`|Data type of the aggregate function's internal transition (state) data| +|`aggtransspace`|integer| |Approximate average size (in bytes) of the transition state data, or zero to use a default estimate| +|`aggmtranstype`|oid|`pg_type.oid`|Data type of the aggregate function's internal transition (state) data for moving-aggregate mode (zero if none)| +|`aggmtransspace`|integer| |Approximate average size (in bytes) of the transition state data for moving-aggregate mode, or zero to use a default estimate| +|`agginitval`|text| |The initial value of the transition state. This is a text field containing the initial value in its external string representation. If this field is NULL, the transition state value starts out NULL.| +|`aggminitval`|text| |The initial value of the transition state for moving- aggregate mode. This is a text field containing the initial value in its external string representation. If this field is NULL, the transition state value starts out NULL.| +| `aggrepsafeexec` | bool | | True if the aggregate is safe to execute in parallel. | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-am.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-am.md index afcae2a362..8f502ea737 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-am.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-am.md @@ -3,3 +3,12 @@ title: pg_am --- # pg_am + +The `pg_am` table in the `pg_catalog` schema stores information about index access methods. There is one row for each index access method supported by the system. + +|column|type|references|description| +|------|----|----------|-----------| +|`oid`|oid| |Row identifier (hidden attribute; must be explicitly selected)| +|`amname`|name| |Name of the access method| +|`amhandler`|regproc| | OID of a handler function responsible for supplying information about the access method| +|`amtype`|char| |`t` for table (including materialized views), `i` for index| diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-amop.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-amop.md index a6d7a28368..f74fd77e25 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-amop.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-amop.md @@ -3,3 +3,19 @@ title: pg_amop --- # pg_amop + +The `pg_amop` table in the `pg_catalog` schema stores information about operators associated with index access method operator classes. There is one row for each operator that is a member of an operator class. + +An entry's `amopmethod` must match the `opfmethod` of its containing operator family (including `amopmethod` here is an intentional denormalization of the catalog structure for performance reasons). Also, `amoplefttype` and `amoprighttype` must match the `oprleft` and `oprright` fields of the referenced `pg_operator` entry. + +|column|type|references|description| +|------|----|----------|-----------| +|`oid`|oid| |Row identifier (hidden attribute; must be explicitly selected)| +|`amopfamily`|oid| `pg_opfamily.oid` |The operator family that this entry is for| +|`amoplefttype`|oid|`pg_type.oid`|Left-hand input data type of operator| +|`amoprighttype`|oid|`pg_type.oid`|Right-hand input data type of operator| +|`amopstrategy`|smallint| |Operator strategy number| +|`amoppurpose`|char| |Operator purpose, either `s` for search or `o` for ordering| +|`amopopr`|oid|`pg_operator.oid`|OID of the operator| +|`amopmethod`|oid|`pg_am.oid`|Index access method for the operator family| +|`amopsortfamily`|oid|`pg_opfamily.oid`|If an ordering operator, the B-tree operator family that this entry sorts according to; zero if a search operator| diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-amproc.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-amproc.md index f85ceec325..ae8484e742 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-amproc.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-amproc.md @@ -3,3 +3,14 @@ title: pg_amproc --- # pg_amproc + +The `pg_amproc` table in the `pg_catalog` schema stores information about support procedures associated with index access method operator classes. There is one row for each support procedure belonging to an operator class. + +|column|type|references|description| +|------|----|----------|-----------| +|`oid`|oid| |Row identifier (hidden attribute; must be explicitly selected)| +|`amprocfamily`|oid|`pg_opfamily.oid`|The operator family this entry is for| +|`amproclefttype`|oid|`pg_type.oid`|Left-hand input data type of associated operator| +|`amprocrighttype`|oid|`pg_type.oid`|Right-hand input data type of associated operator| +|`amprocnum`|smallint| |Support procedure number| +|`amproc`|regproc|`pg_proc.oid`|OID of the procedure| diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-appendonly.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-appendonly.md index c553f8c3ce..5b5ef4f69a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-appendonly.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-appendonly.md @@ -3,3 +3,21 @@ title: pg_appendonly --- # pg_appendonly + +The `pg_appendonly` table in the `pg_catalog` schema contains information about the storage options and other characteristics of append-optimized tables. + +|column|type|references|description| +|------|----|----------|-----------| +|`relid`|oid| |The table object identifier \(OID\) of the table.| +| `blocksize` | integer | | Block size used for compression of append-optimized tables. Valid values are 8K - 2M. Default is `32K`. | +| `compresslevel`|smallint| |The compression level, with compression ratio increasing from 1 to 19. When quicklz1 is specified for compresstype, valid values are 1 or 3. With zlib specified, valid values are 1-9. When zstd is specified, valid values are 1-19. | +| `checksum`|boolean| |A checksum value that is stored to compare the state of a block of data at compression time and at scan time to ensure data integrity. | +| `compresstype`|name| |Type of compression used to compress append-optimized tables. Valid values are:
- `none` (no compression)
- `rle_type` (run-length encoding compression)
- `zlib` (gzip compression)
- `zstd` (Zstandard compression)
- `quicklz` | +| `columnstore` | boolean | | `1` for column-oriented storage, `0` for row-oriented storage. | +| `segrelid` | oid | |Table on-disk segment file id. | +| `segfilecount` | smallint| |Number of segment files. | +| `version` | smallint | |Version of the append-optimized table. | +| `blkdirrelid` | oid | |Block used for on-disk column-oriented table file. | +| `blkdiridxid` | oid | |Block used for on-disk column-oriented index file. | +| `visimaprelid` | oid | |Visibility map for the table. | +| `visimapidxid` | oid | |B-tree index on the visibility map. | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attribute-encoding.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attribute-encoding.md index 93eee9b238..0fd5f5b589 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attribute-encoding.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attribute-encoding.md @@ -3,3 +3,18 @@ title: pg_attribute_encoding --- # pg_attribute_encoding + +The `pg_attribute_encoding` system catalog table in the `pg_catalog` schema contains column storage information. + +|column|type|modifers|storage|description| +|------|----|--------|-------|-----------| +|`attrelid`|oid|not null|plain|Foreign key to `pg_attribute.attrelid`| +|`attnum`|smallint|not null|plain|Foreign key to `pg_attribute.attnum`| +| `filenum` | smallint | not null | plain | The column file number | +|`attoptions`|text [ ]| |extended|The options| + +For a column with `filenum = f`, the column files on disk use the suffix `(f - 1)*128 to f*128 - 1`. For example: + +- Column with `filenum = 1` has files `relfilenode`, `relfilenode.1` .. `relfilenode.127`. +- Column with `filenum = 2` has files `relfilenode.128`, `relfilenode.129` .. `relfilenode.255`. +- Column with `filenum = 3` has files `relfilenode.256`, `relfilenode.257` .. `relfilenode.383`. diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attribute.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attribute.md index 06e5d82497..ec393a6cbf 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attribute.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attribute.md @@ -3,3 +3,36 @@ title: pg_attribute --- # pg_attribute + +The `pg_attribute` table in the `pg_catalog` schema stores information about table columns. There will be exactly one `pg_attribute` row for every column in every table in the database. (There will also be attribute entries for indexes, and all objects that have `pg_class` entries.) The term attribute is equivalent to column. + +In a dropped column's `pg_attribute` entry, `atttypid` is reset to zero, but `attlen` and the other fields copied from `pg_type` are still valid. This arrangement is needed to address the situation where the dropped column's data type was later dropped, and so there is no `pg_type` row anymore. `attlen` and the other fields can be used to interpret the contents of a row of the table. + +|Column|Type|References|Description| +|------|----|----------|-----------| +|`attrelid`|oid|`pg_class.oid`|The table this column belongs to.| +|`attname`|name| |The column name.| +|`atttypid`|oid|`pg_type.oid`|The data type of this column.| +|`attstattarget`|integer| |Controls the level of detail of statistics accumulated for this column by `ANALYZE`. A zero value indicates that no statistics should be collected. A negative value says to use the system default statistics target. The exact meaning of positive values is data type-dependent. For scalar data types, it is both the target number of "most common values" to collect, and the target number of histogram bins to create.| +|`attlen`|smallint| |A copy of `pg_type.typlen` of this column's type.| +|`attnum`|smallint| |The number of the column. Ordinary columns are numbered from 1 up. System columns, such as `ctid`, have (arbitrary) negative numbers.| +|`attndims`|integer| |Number of dimensions, if the column is an array type; otherwise `0`. (Currently, the number of dimensions of an array is not enforced, so any nonzero value effectively means it is an array.)| +|`attcacheoff`|integer| |Always `-1` in storage, but when loaded into a row descriptor in memory this may be updated to cache the offset of the attribute within the row.| +|`atttypmod`|integer| |Records type-specific data supplied at table creation time (for example, the maximum length of a `varchar` column). It is passed to type-specific input functions and length coercion functions. The value will generally be `-1` for types that do not need it.| +|`attbyval`|boolean| |A copy of `pg_type.typbyval` of this column's type.| +|`attstorage`|char| |Normally a copy of `pg_type.typstorage` of this column's type. For TOAST-able data types, this can be altered after column creation to control storage policy.| +|`attalign`|char| |A copy of `pg_type.typalign` of this column's type.| +|`attnotnull`|boolean| |This represents a not-null constraint. | +| `attcompression` | char | | Compression type for this column. Valid values are `n` for none, `r` for run-length encoding, `z` for zlib, `q` for quicklz, and `s` for snappy. | +|`atthasdef`|boolean| |This column has a default expression or generation expression, in which case there will be a corresponding entry in the `pg_attrdef` catalog that actually defines the value. (Check `attgenerated` to determine whether this is a default or a generation expression.)| +|`atthasmissing`|boolean| |This column has a value which is used where the column is entirely missing from the row, as happens when a column is added with a non-volatile `DEFAULT` value after the row is created. The actual value used is stored in the `attmissingval` column.| +|`attidentity`|char| |If a zero byte (''), then not an identity column. Otherwise, `a` = generated always, `d` = generated by default.| +|`attgenerated`|char| |If a zero byte (''), then not a generated column. Otherwise, `s` = stored. (Other values might be added in the future.) | +|`attisdropped`|boolean| |This column has been dropped and is no longer valid. A dropped column is still physically present in the table, but is ignored by the parser and so cannot be accessed via SQL.| +|`attislocal`|boolean| |This column is defined locally in the relation. Note that a column may be locally defined and inherited simultaneously.| +|`attinhcount`|integer| |The number of direct ancestors this column has. A column with a nonzero number of ancestors cannot be dropped nor renamed.| +|`attcollation`|oid|`pg_collation.oid`|The defined collation of the column, or zero if the is not of a collatable data type.| +|`attacl`|aclitem[]| |Column-level access privileges, if any have been granted specifically on this column.| +|`attoptions`|text[]| |Attribute-level options, as "keyword=value" strings.| +|`attfdwoptions`|text[]| |Attribute-level foreign data wrapper options, as "keyword=value" strings.| +|`attmissingval`|anyarray| |This column has a one element array containing the value used when the column is entirely missing from the row, as happens when the column is added with a non-volatile `DEFAULT` value after the row is created. The value is only used when `atthasmissing` is `true`. If there is no value the column is null.| \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attridef.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attridef.md index 0a10bfc548..8a1311a24c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attridef.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attridef.md @@ -3,3 +3,12 @@ title: pg_attrdef --- # pg_attrdef + +The `pg_attrdef` table in the `pg_catalog` schema stores column default values. The main information about columns is stored in `pg_attribute`. Only columns that explicitly specify a default value (when the table is created or the column is added) will have an entry here. + +|column|type|references|description| +|------|----|----------|-----------| +|`oid`|oid| |The object ID| +|`adrelid`|oid| `pg_class.oid` |The table this column belongs to| +|`adnum`|smallint| `pg_attribute.attnum` |The number of the column| +|`adbin`|pg_node_tree| |The internal representation of the column default value| \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-auth-members.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-auth-members.md index fe2c58dbbc..14c9883b09 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-auth-members.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-auth-members.md @@ -3,3 +3,12 @@ title: pg_auth_members --- # pg_auth_members + +The `pg_auth_members` system catalog table in the `pg_catalog` schema shows the membership relations between roles. Any non-circular set of relationships is allowed. Because roles are system-wide, `pg_auth_members` is shared across all databases of a Apache Cloudberry system. + +|column|type|references|description| +|------|----|----------|-----------| +|`roleid`|oid|`pg_authid.oid`|ID of the parent-level (group) role| +|`member`|oid|`pg_authid.oid`|ID of a member role| +|`grantor`|oid|`pg_authid.oid`|ID of the role that granted this membership| +|`admin_option`|boolean| |True if role member might grant membership to others| diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-authid.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-authid.md index bfca508887..ccf319cab0 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-authid.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-authid.md @@ -3,3 +3,36 @@ title: pg_authid --- # pg_authid + +The `pg_authid` table in the `pg_catalog` schema contains information about database authorization identifiers (roles). A role subsumes the concepts of users and groups. A user is a role with the `rolcanlogin` flag set. Any role (with or without `rolcanlogin`) might have other roles as members. See [`pg_auth_members`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md). + +Because this catalog contains passwords, it must not be publicly readable. `pg_roles` is a publicly readable view on `pg_authid` that blanks out the password field. + +Because user identities are system-wide, `pg_authid` is shared across all databases in a Apache Cloudberry system: there is only one copy of `pg_authid` per system, not one per database. + +|column|type|references|description| +|------|----|----------|-----------| +|`oid`|oid| |Row identifier| +|`rolname`|name| |Role name| +|`rolsuper`|boolean| |Role has superuser privileges| +|`rolinherit`|boolean| |Role automatically inherits privileges of roles it is a member of| +|`rolcreaterole`|boolean| |Role might create more roles| +|`rolcreatedb`|boolean| |Role might create databases| +|`rolcanlogin`|boolean| |Role might log in. That is, this role can be given as the initial session authorization identifier| +|`rolreplication`|boolean| |Role is a replication role. That is, this role can initiate streaming replication and set/unset the system backup mode using `pg_start_backup` and `pg_stop_backup`.| +|`rolbypassrls`|boolean| |Roles bypasses every row-level security policy.| +|`rolconnlimit`|int4| |For roles that can log in, this sets maximum number of concurrent connections this role can make. `-1` means no limit| +| `rolenableprofile` | `boolean` | | Role has a profile. | +|`rolpassword`|text| |Password (possibly encrypted); NULL if none. If the password is encrypted, this column will begin with the string `md5` followed by a 32-character hexadecimal MD5 hash. The MD5 hash will be the user's password concatenated to their user name. For example, if user `joe` has password `xyzzy`, Apache Cloudberry will store the md5 hash of `xyzzyjoe`. Apache Cloudberry assumes that a password that does not follow that format is unencrypted.| +|`rolvaliduntil`|timestamptz| |Password expiry time (only used for password authentication); NULL if no expiration| +| `rolprofile` | `oid` | | Object ID of the associated profile ID in `pg_profile` | +| `rolaccountstatus` | smallint | | Account status of the role. | +| `rolfailedlogins` | integer | | Number of failed login attempts. | +| `rolpasswordsetat` | timestamptz | | Time when the password was last set. | +| `rollockdate` | timestamptz | | Time when the role was locked. | +| `rolpasswordexpire` | timestamptz | | Time when the password will expire. | +|`rolresqueue`|oid| |Object ID of the associated resource queue ID in `pg_resqueue` | +|`rolcreaterextgpfd`|boolean| |Privilege to create read external tables with the `gpfdist` or `gpfdists` protocol| +|`rolcreaterexhttp`|boolean| |Privilege to create read external tables with the `http` protocol| +|`rolcreatewextgpfd`|boolean| |Privilege to create write external tables with the `gpfdist` or `gpfdists` protocol| +|`rolresgroup`|oid| |Object ID of the associated resource group ID in `pg_resgroup` | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-cast.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-cast.md index 0009b37fd7..ce3269f110 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-cast.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-cast.md @@ -3,3 +3,22 @@ title: pg_cast --- # pg_cast + +The `pg_cast` table in the `pg_catalog` schema stores data type conversion paths, both built-in paths and those defined with `CREATE CAST`. + +Note that `pg_cast` does not represent every type conversion known to the system, only those that cannot be deduced from some generic rule. For example, casting between a domain and its base type is not explicitly represented in `pg_cast`. Another important exception is that "automatic I/O conversion casts", those performed using a data type's own I/O functions to convert to or from `text` or other string types, are not explicitly represented in `pg_cast`. + +The cast functions listed in `pg_cast` must always take the cast source type as their first argument type, and return the cast destination type as their result type. A cast function can have up to three arguments. The second argument, if present, must be type `integer`; it receives the type modifier associated with the destination type, or `-1` if there is none. The third argument, if present, must be type `boolean`; it receives `true` if the cast is an explicit cast, `false` otherwise. + +It is legitimate to create a `pg_cast` entry in which the source and target types are the same, if the associated function takes more than one argument. Such entries represent 'length coercion functions' that coerce values of the type to be legal for a particular type modifier value. + +When a `pg_cast` entry has different source and target types and a function that takes more than one argument, the entry converts from one type to another and applies a length coercion in a single step. When no such entry is available, coercion to a type that uses a type modifier involves two steps, one to convert between data types and a second to apply the modifier. + +|column|type|references|description| +|------|----|----------|-----------| +|`oid`|oid||The object ID.| +|`castsource`|oid|`pg_type.oid`|OID of the source data type.| +|`casttarget`|oid|`pg_type.oid`|OID of the target data type.| +|`castfunc`|oid|`pg_proc.oid`|The OID of the function to use to perform this cast. Zero is stored if the cast method does not require a function.| +|`castcontext`|char| |Indicates what contexts the cast may be invoked in. `e` means only as an explicit cast (using `CAST` or `::` syntax). `a` means implicitly in assignment to a target column, as well as explicitly. `i` means implicitly in expressions, as well as the other cases*.*| +|`castmethod`|char| |Indicates how the cast is performed:

`f` - The function identified in the `castfunc` field is used.

`i` - The input/output functions are used.

`b` - The types are binary-coercible, and no conversion is required.| diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-class.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-class.md index 19593199ce..82bfb7b5e7 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-class.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-class.md @@ -3,3 +3,43 @@ title: pg_class --- # pg_class + +The system catalog table `pg_class` catalogs tables and most everything else that has columns or is otherwise similar to a table. This includes indexes (see also `pg_index`), sequences, views, materialized views, composite types, and TOAST tables. Below, when we mean all of these kinds of objects we speak of "relations". Not all columns are meaningful for all relation types. + +|column|type|references|description| +|------|----|----------|-----------| +|`oid`|oid| |Row identifier| +|`relname`|name| |Name of the table, index, view.| +|`relnamespace`|oid| `pg_namespace.oid` |The object identifier of the namespace (schema) that contains this relation| +|`reltype`|oid| `pg_type.oid` |The object identifier of the data type that corresponds to this table's row type, if any (zero for indexes, which have no `pg_type` entry)| +|`reloftype`|oid| `pg_type.oid` |For typed tables, the object identifier of the underlying composite type, zero for all other relations| +|`relowner`|oid|`pg_authid.oid`|Owner of the relation| +|`relam`|oid|`pg_am.oid`|If this is a table or an index, the access method used (heap, B-tree, hash.)| +|`relfilenode`|bigint| |Name of the on-disk file of this relation; zero means this is a "mapped" relation whose disk file name is determined by low-level state| +|`reltablespace`|oid|`pg_tablespace.oid`|The tablespace in which this relation is stored. If zero, the database's default tablespace is implied. (Not meaningful if the relation has no on-disk file.)| +|`relpages`|int4| |Size of the on-disk representation of this table in pages (of size `BLCKSZ`). This is only an estimate used by the planner. It is updated by `VACUUM`, `ANALYZE`, and a few DDL commands such as `CREATE INDEX`.| +|`reltuples`|real| |Number of rows in the table. This is only an estimate used by the planner. It is updated by `VACUUM`, `ANALYZE`, and a few DDL commands such as `CREATE INDEX`.| +|`relallvisible`|int4| |Number of pages that are marked all-visible in the table's visibility map. This is only an estimate used by the planner. It is updated by `VACUUM`, `ANALYZE`, and a few DDL commands such as `CREATE INDEX`.| +|`reltoastrelid`|oid| `pg_class.oid` |The object identifier of the TOAST table associated with this table, `0` if none. The TOAST table stores large attributes "out of line" in a secondary table.| +|`relhasindex`|boolean| |True if this is a table and it has (or recently had) any indexes. | +|`relisshared`|boolean| |True if this table is shared across all databases in the system. Only certain system catalog tables (such as `pg_database`) are shared.| +|`relpersistence`|char| |The type of object persistence: `p` = heap or append-optimized permanent table, `u` = unlogged temporary table, `t` = temporary table.| +|`relkind`|char| |The type of object

`r` = heap or append-optimized ordinary table, `i` = index, `S` = sequence, `t` = TOAST table, `v` = view, `m` = materialized view, `c` = composite type, `f` = foreign table, `p` = partitioned table, `I` = partitioned index, `u` = uncatalogued temporary heap table, `o` = internal append-optimized segment files and EOFs, `b` = append-only block directory, `M` = append-only visibility map.| +|`relnatts`|int2| |Number of user columns in the relation (system columns not counted). There must be this many corresponding entries in `pg_attribute`. See also `pg_attribute.attnum`.| +|`relchecks`|int2| |Number of `CHECK` constraints on the table; see `pg_constraint` catalog.| +|`relhasrules`|boolean| |True if table has (or once had) rules; see `pg_rewrite` catalog.| +|`relhastriggers`|boolean| |True if table has (or once had) triggers.| +|`relhassubclass`|boolean| |True if table has (or once had) any inheritance children.| +|`relrowsecurity`|boolean| |True if table has row level security enabled; see `pg_policy` catalog.| +|`relforcerowsecurity`|boolean| |True if row level security (when enabled) will also apply to the table owner; see `pg_policy` catalog.| +|`relispopulated`|boolean| |True if relation is populated (this is true for all relations other than some materialized views).| +|`relreplident`|char| |Columns used to form "replica identity" for rows: `d` = default (primary key, if any), `n` = nothing, `f` = all columns, `i` = index with `indisreplident` set (same as nothing if the index used has been dropped).| +|`relispartition`|boolean| | True if table or index is a partition.| +|`relrewrite`|oid|`pg_class.oid` | For new relations being written during a DDL operation that requires a table rewrite, this contains the object identifier of the original relation; otherwise 0. That state is only visible internally; this field should never contain anything other than 0 for a user-visible relation.| +|`relfrozenxid`|xid| |All transaction IDs before this one have been replaced with a permanent (frozen) transaction ID in this table. This is used to track whether the table needs to be vacuumed in order to prevent transaction ID wraparound or to allow `pg_xact` to be shrunk.

The value is `0` (`InvalidTransactionId`) if the relation is not a table or if the table does not require vacuuming to prevent transaction ID wraparound. The table still might require vacuuming to reclaim disk space.| +|`relminmxid`|xid| |All multixact IDs before this one have been replaced by a transaction ID in this table. This is used to track whether the table needs to be vacuumed in order to prevent multixact ID wraparound or to allow `pg_multixact` to be shrunk. Zero (`InvalidMultiXactId`) if the relation is not a table.| +|`relacl`|aclitem[]| |Access privileges assigned by `GRANT` and `REVOKE`.| +|`reloptions`|text[]| |Access-method-specific options, as "keyword=value" strings.| +|`relpartbound`|`pg_node_tree`| |If table is a partition (see `relispartition`), internal representation of the partition bound.| + +Several of the Boolean flags in `pg_class` are maintained lazily: they are guaranteed to be true if that's the correct state, but might not be reset to false immediately when the condition is no longer true. For example, `relhasindex` is set by `CREATE INDEX`, but it is never cleared by `DROP INDEX`. Instead, `VACUUM` clears `relhasindex` if it finds the table has no indexes. This arrangement avoids race conditions and improves concurrency. From 564f72fb8bc79ef542b76285603f1470a58f87ac Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Fri, 21 Feb 2025 14:26:51 +0800 Subject: [PATCH 12/13] add zh docs --- .../sys-catalogs/sys-tables/pg-aggregate.md | 52 ++++++------- .../current/sys-catalogs/sys-tables/pg-am.md | 14 ++-- .../sys-catalogs/sys-tables/pg-amop.md | 26 +++---- .../sys-catalogs/sys-tables/pg-amproc.md | 18 ++--- .../sys-catalogs/sys-tables/pg-appendonly.md | 32 ++++---- .../sys-tables/pg-attribute-encoding.md | 22 +++--- .../sys-catalogs/sys-tables/pg-attribute.md | 60 +++++++-------- .../sys-catalogs/sys-tables/pg-attridef.md | 14 ++-- .../sys-tables/pg-auth-members.md | 14 ++-- .../sys-catalogs/sys-tables/pg-authid.md | 58 +++++++-------- .../sys-catalogs/sys-tables/pg-cast.md | 26 +++---- .../sys-catalogs/sys-tables/pg-class.md | 74 +++++++++---------- 12 files changed, 205 insertions(+), 205 deletions(-) diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-aggregate.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-aggregate.md index 9aeaa30671..b142ca0a53 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-aggregate.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-aggregate.md @@ -4,30 +4,30 @@ title: pg_aggregate # pg_aggregate -The `pg_aggregate` table in the `pg_catalog` schema stores information about aggregate functions. An aggregate function is a function that operates on a set of values (typically one column from each row that matches a query condition) and returns a single value computed from all these values. Typical aggregate functions are `sum`, `count`, and `max`. Each entry in `pg_aggregate` is an extension of an entry in `pg_proc`. The `pg_proc` entry carries the aggregate's name, input and output data types, and other information that is similar to ordinary functions. +`pg_catalog` 模式中的 `pg_aggregate` 表用于存储聚合函数的相关信息。聚合函数是对一组值(通常是满足查询条件的每一行中某一列的值)进行操作,并从这些值中计算出一个单一结果的函数。常见的聚合函数包括 `sum`、`count` 和 `max`。`pg_aggregate` 表中的每一项都是 `pg_proc` 表中对应项的扩展,其中 `pg_proc` 表记录了聚合函数的名称、输入输出数据类型以及其他与普通函数相似的信息。 -|column|type|references|description| -|------|----|----------|-----------| -|`aggfnoid`|regproc|`pg_proc.oid`|OID of the aggregate function| -|`aggkind`|char| |Aggregate kind: `n` for *normal* aggregates, `o` for *ordered-set* aggregates, or `h` for *hypothetical-set* aggregates| -|`aggnumdirectargs`|smallint| |Number of direct (non-aggregated) arguments of an ordered-set or hypothetical-set aggregate, counting a variadic array as one argument. If equal to `pronargs`, the aggregate must be variadic and the variadic array describes the aggregated arguments as well as the final direct arguments. Always zero for normal aggregates.| -|`aggtransfn`|regproc|`pg_proc.oid`|Transition function OID| -|`aggfinalfn`|regproc|`pg_proc.oid`|Final function OID (zero if none)| -|`aggcombinefn`|regproc|`pg_proc.oid`|Combine function OID (zero if none)| -|`aggserialfn`|regproc|`pg_proc.oid`|OID of the serialization function to convert transtype to `bytea` (zero if none)| -|`aggdeserialfn`|regproc|`pg_proc.oid`|OID of the deserialization function to convert `bytea` to transtype (zero if none)| -|`aggmtransfn`|regproc|`pg_proc.oid`|Forward transition function OID for moving-aggregate mode (zero if none)| -|`aggminvtransfn`|regproc|`pg_proc.oid`|Inverse transition function OID for moving-aggregate mode (zero if none)| -|`aggmfinalfn`|regproc|`pg_proc.oid`|Final function OID for moving-aggregate mode (zero if none)| -|`aggfinalextra`|bool| |True to pass extra dummy arguments to `aggfinalfn`| -|`aggmfinalextra`|bool| |True to pass extra dummy arguments to `aggmfinalfn`| -|`aggfinalmodify`|char| |Indicates whether `aggfinalfn` modifies the transition state| -|`aggmfinalmodify`|char| |Indicates whether `aggmfinalfn` modifies the transition state| -|`aggsortop`|oid|`pg_operator.oid`|Associated sort operator OID (zero if none)| -|`aggtranstype`|oid|`pg_type.oid`|Data type of the aggregate function's internal transition (state) data| -|`aggtransspace`|integer| |Approximate average size (in bytes) of the transition state data, or zero to use a default estimate| -|`aggmtranstype`|oid|`pg_type.oid`|Data type of the aggregate function's internal transition (state) data for moving-aggregate mode (zero if none)| -|`aggmtransspace`|integer| |Approximate average size (in bytes) of the transition state data for moving-aggregate mode, or zero to use a default estimate| -|`agginitval`|text| |The initial value of the transition state. This is a text field containing the initial value in its external string representation. If this field is NULL, the transition state value starts out NULL.| -|`aggminitval`|text| |The initial value of the transition state for moving- aggregate mode. This is a text field containing the initial value in its external string representation. If this field is NULL, the transition state value starts out NULL.| -| `aggrepsafeexec` | bool | | True if the aggregate is safe to execute in parallel. | +|列名|类型|引用|描述| +|----|----|----|----| +|`aggfnoid`|regproc|`pg_proc.oid`|聚合函数的 OID| +|`aggkind`|char| |聚合类型:`n` 表示普通聚合,`o` 表示有序集合聚合,`h` 表示假设集合聚合| +|`aggnumdirectargs`|smallint| |有序集合或假设集合聚合的直接参数数量(非聚合参数),变长参数数组算作一个参数。如果该值等于 `pronargs`,则聚合函数必须是变长的,且变长参数数组同时描述了聚合参数和最终的直接参数。对于普通聚合,此值始终为零。| +|`aggtransfn`|regproc|`pg_proc.oid`|转换函数的 OID| +|`aggfinalfn`|regproc|`pg_proc.oid`|最终函数的 OID(如果不存在则为零)| +|`aggcombinefn`|regproc|`pg_proc.oid`|组合函数的 OID(如果不存在则为零)| +|`aggserialfn`|regproc|`pg_proc.oid`|序列化函数的 OID,用于将转换类型转换为 `bytea`(如果不存在则为零)| +|`aggdeserialfn`|regproc|`pg_proc.oid`|反序列化函数的 OID,用于将 `bytea` 转换回转换类型(如果不存在则为零)| +|`aggmtransfn`|regproc|`pg_proc.oid`|移动聚合模式下的正向转换函数 OID(如果不存在则为零)| +|`aggminvtransfn`|regproc|`pg_proc.oid`|移动聚合模式下的逆向转换函数 OID(如果不存在则为零)| +|`aggmfinalfn`|regproc|`pg_proc.oid`|移动聚合模式下的最终函数 OID(如果不存在则为零)| +|`aggfinalextra`|bool| |如果为 `true`,则向 `aggfinalfn` 传递额外的虚拟参数| +|`aggmfinalextra`|bool| |如果为 `true`,则向 `aggmfinalfn` 传递额外的虚拟参数| +|`aggfinalmodify`|char| |指示 `aggfinalfn` 是否修改转换状态| +|`aggmfinalmodify`|char| |指示 `aggmfinalfn` 是否修改转换状态| +|`aggsortop`|oid|`pg_operator.oid`|相关排序操作符的 OID(如果不存在则为零)| +|`aggtranstype`|oid|`pg_type.oid`|聚合函数内部转换(状态)数据的数据类型| +|`aggtransspace`|integer| |转换状态数据的近似平均大小(以字节为单位),或者为零以使用默认估计值| +|`aggmtranstype`|oid|`pg_type.oid`|移动聚合模式下聚合函数内部转换(状态)数据的数据类型(如果不存在则为零)| +|`aggmtransspace`|integer| |移动聚合模式下转换状态数据的近似平均大小(以字节为单位),或者为零以使用默认估计值| +|`agginitval`|text| |转换状态的初始值。这是一个文本字段,包含其外部字符串表示形式的初始值。如果此字段为 NULL,则转换状态值从 NULL 开始。| +|`aggminitval`|text| |移动聚合模式下转换状态的初始值。这是一个文本字段,包含其外部字符串表示形式的初始值。如果此字段为 NULL,则转换状态值从 NULL 开始。| +|`aggrepsafeexec`|bool| |如果聚合函数可以在并行执行中安全运行,则为 `true`| \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-am.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-am.md index 8f502ea737..08ac007edc 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-am.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-am.md @@ -4,11 +4,11 @@ title: pg_am # pg_am -The `pg_am` table in the `pg_catalog` schema stores information about index access methods. There is one row for each index access method supported by the system. +`pg_catalog` 模式中的 `pg_am` 表用于存储索引访问方法的相关信息。系统支持的每种索引访问方法都对应表中的一行记录。 -|column|type|references|description| -|------|----|----------|-----------| -|`oid`|oid| |Row identifier (hidden attribute; must be explicitly selected)| -|`amname`|name| |Name of the access method| -|`amhandler`|regproc| | OID of a handler function responsible for supplying information about the access method| -|`amtype`|char| |`t` for table (including materialized views), `i` for index| +| 列名 | 类型 | 引用 | 描述 | +|-----------|--------|------|------| +| `oid` | oid | | 行标识符(隐藏属性;需显式选择) | +| `amname` | name | | 访问方法的名称 | +| `amhandler` | regproc | | 负责提供访问方法信息的处理函数的 OID | +| `amtype` | char | | `t` 表示表(包括物化视图),`i` 表示索引 | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-amop.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-amop.md index f74fd77e25..7c693d8f42 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-amop.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-amop.md @@ -4,18 +4,18 @@ title: pg_amop # pg_amop -The `pg_amop` table in the `pg_catalog` schema stores information about operators associated with index access method operator classes. There is one row for each operator that is a member of an operator class. +`pg_catalog` 模式中的 `pg_amop` 表用于存储与索引访问方法操作类相关操作符的信息。表中每一行都对应一个操作类中的成员操作符。 -An entry's `amopmethod` must match the `opfmethod` of its containing operator family (including `amopmethod` here is an intentional denormalization of the catalog structure for performance reasons). Also, `amoplefttype` and `amoprighttype` must match the `oprleft` and `oprright` fields of the referenced `pg_operator` entry. +表中的 `amopmethod` 字段必须与所属操作符家族的 `opfmethod` 字段匹配(包含 `amopmethod` 是为了性能优化而有意保留的冗余设计)。此外,`amoplefttype` 和 `amoprighttype` 字段必须与引用的 `pg_operator` 条目中的 `oprleft` 和 `oprright` 字段一致。 -|column|type|references|description| -|------|----|----------|-----------| -|`oid`|oid| |Row identifier (hidden attribute; must be explicitly selected)| -|`amopfamily`|oid| `pg_opfamily.oid` |The operator family that this entry is for| -|`amoplefttype`|oid|`pg_type.oid`|Left-hand input data type of operator| -|`amoprighttype`|oid|`pg_type.oid`|Right-hand input data type of operator| -|`amopstrategy`|smallint| |Operator strategy number| -|`amoppurpose`|char| |Operator purpose, either `s` for search or `o` for ordering| -|`amopopr`|oid|`pg_operator.oid`|OID of the operator| -|`amopmethod`|oid|`pg_am.oid`|Index access method for the operator family| -|`amopsortfamily`|oid|`pg_opfamily.oid`|If an ordering operator, the B-tree operator family that this entry sorts according to; zero if a search operator| +| 列名 | 类型 | 引用 | 描述 | +|---------------|--------|-----------------------|--------------------------| +| `oid` | oid | | 行标识符(隐藏属性,需显式选择) | +| `amopfamily` | oid | `pg_opfamily.oid` | 所属操作符家族 | +| `amoplefttype`| oid | `pg_type.oid` | 操作符的左输入数据类型 | +| `amoprighttype`| oid | `pg_type.oid` | 操作符的右输入数据类型 | +| `amopstrategy`| smallint | | 操作符策略编号 | +| `amoppurpose` | char | | 操作符用途,`s` 表示搜索,`o` 表示排序 | +| `amopopr` | oid | `pg_operator.oid` | 操作符的 OID | +| `amopmethod` | oid | `pg_am.oid` | 操作符家族的索引访问方法 | +| `amopsortfamily`| oid | `pg_opfamily.oid` | 若为排序操作符,则为对应的 B 树操作符家族;若为搜索操作符,则为零 | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-amproc.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-amproc.md index ae8484e742..063ee30377 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-amproc.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-amproc.md @@ -4,13 +4,13 @@ title: pg_amproc # pg_amproc -The `pg_amproc` table in the `pg_catalog` schema stores information about support procedures associated with index access method operator classes. There is one row for each support procedure belonging to an operator class. +`pg_catalog` 模式中的 `pg_amproc` 表记录了与索引访问方法操作类相关支持过程的信息。表中的每一行代表一个属于操作类的支持过程。 -|column|type|references|description| -|------|----|----------|-----------| -|`oid`|oid| |Row identifier (hidden attribute; must be explicitly selected)| -|`amprocfamily`|oid|`pg_opfamily.oid`|The operator family this entry is for| -|`amproclefttype`|oid|`pg_type.oid`|Left-hand input data type of associated operator| -|`amprocrighttype`|oid|`pg_type.oid`|Right-hand input data type of associated operator| -|`amprocnum`|smallint| |Support procedure number| -|`amproc`|regproc|`pg_proc.oid`|OID of the procedure| +| 列名 | 类型 | 引用 | 描述 | +|---------------|--------|-----------------------|--------------------------| +| `oid` | oid | | 行标识符(隐藏属性,需显式选择) | +| `amprocfamily`| oid | `pg_opfamily.oid` | 所属操作符家族 | +| `amproclefttype`| oid | `pg_type.oid` | 相关操作符的左输入数据类型 | +| `amprocrighttype`| oid | `pg_type.oid` | 相关操作符的右输入数据类型 | +| `amprocnum` | smallint | | 支持过程编号 | +| `amproc` | regproc| `pg_proc.oid` | 支持过程的 OID | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-appendonly.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-appendonly.md index 5b5ef4f69a..e83a1b3265 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-appendonly.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-appendonly.md @@ -4,20 +4,20 @@ title: pg_appendonly # pg_appendonly -The `pg_appendonly` table in the `pg_catalog` schema contains information about the storage options and other characteristics of append-optimized tables. +`pg_catalog` 模式中的 `pg_appendonly` 表记录了追加优化表 (Append-Optimized) 的存储选项及其他特性信息。 -|column|type|references|description| -|------|----|----------|-----------| -|`relid`|oid| |The table object identifier \(OID\) of the table.| -| `blocksize` | integer | | Block size used for compression of append-optimized tables. Valid values are 8K - 2M. Default is `32K`. | -| `compresslevel`|smallint| |The compression level, with compression ratio increasing from 1 to 19. When quicklz1 is specified for compresstype, valid values are 1 or 3. With zlib specified, valid values are 1-9. When zstd is specified, valid values are 1-19. | -| `checksum`|boolean| |A checksum value that is stored to compare the state of a block of data at compression time and at scan time to ensure data integrity. | -| `compresstype`|name| |Type of compression used to compress append-optimized tables. Valid values are:
- `none` (no compression)
- `rle_type` (run-length encoding compression)
- `zlib` (gzip compression)
- `zstd` (Zstandard compression)
- `quicklz` | -| `columnstore` | boolean | | `1` for column-oriented storage, `0` for row-oriented storage. | -| `segrelid` | oid | |Table on-disk segment file id. | -| `segfilecount` | smallint| |Number of segment files. | -| `version` | smallint | |Version of the append-optimized table. | -| `blkdirrelid` | oid | |Block used for on-disk column-oriented table file. | -| `blkdiridxid` | oid | |Block used for on-disk column-oriented index file. | -| `visimaprelid` | oid | |Visibility map for the table. | -| `visimapidxid` | oid | |B-tree index on the visibility map. | +| 列名 | 类型 | 引用 | 描述 | +|---------------|------------|------|------| +| `relid` | oid | | 表的对象标识符(OID)。 | +| `blocksize` | integer | | 追加优化表压缩所用的块大小。有效范围为 8K - 2M,默认值为 `32K`。 | +| `compresslevel` | smallint | | 压缩级别,压缩比从 1 增加到 19。若指定 `quicklz1` 为压缩类型,有效值为 1 或 3;指定 `zlib` 时,有效值为 1-9;指定 `zstd` 时,有效值为 1-19。 | +| `checksum` | boolean | | 用于校验数据块在压缩和扫描时的状态,以确保数据完整性。 | +| `compresstype` | name | | 追加优化表所用的压缩类型。有效值包括:
- `none`(无压缩)
- `rle_type`(游程编码压缩)
- `zlib`(gzip 压缩)
- `zstd`(Zstandard 压缩)
- `quicklz` | +| `columnstore` | boolean | | `1` 表示列存储,`0` 表示行存储。 | +| `segrelid` | oid | | 表的磁盘段文件 ID。 | +| `segfilecount`| smallint | | 段文件数量。 | +| `version` | smallint | | 追加优化表的版本号。 | +| `blkdirrelid` | oid | | 用于磁盘列存储表文件的块。 | +| `blkdiridxid` | oid | | 用于磁盘列存储索引文件的块。 | +| `visimaprelid`| oid | | 表的可见性映射。 | +| `visimapidxid`| oid | | 可见性映射的 B 树索引。 | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attribute-encoding.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attribute-encoding.md index 0fd5f5b589..9c2eda0c0d 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attribute-encoding.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attribute-encoding.md @@ -4,17 +4,17 @@ title: pg_attribute_encoding # pg_attribute_encoding -The `pg_attribute_encoding` system catalog table in the `pg_catalog` schema contains column storage information. +`pg_catalog` 模式下的 `pg_attribute_encoding` 系统目录表记录了列存储的相关信息。 -|column|type|modifers|storage|description| -|------|----|--------|-------|-----------| -|`attrelid`|oid|not null|plain|Foreign key to `pg_attribute.attrelid`| -|`attnum`|smallint|not null|plain|Foreign key to `pg_attribute.attnum`| -| `filenum` | smallint | not null | plain | The column file number | -|`attoptions`|text [ ]| |extended|The options| +| 列名 | 类型 | 修饰符 | 存储方式 | 描述 | +|---------------|------------|----------|----------|--------------------------| +| `attrelid` | oid | not null | plain | 外键,关联至 `pg_attribute.attrelid` | +| `attnum` | smallint | not null | plain | 外键,关联至 `pg_attribute.attnum` | +| `filenum` | smallint | not null | plain | 列的文件编号 | +| `attoptions` | text[] | | extended | 列的存储选项 | -For a column with `filenum = f`, the column files on disk use the suffix `(f - 1)*128 to f*128 - 1`. For example: +当列的 `filenum` 值为 `f` 时,磁盘上的列文件会使用 `(f - 1)*128` 到 `f*128 - 1` 的后缀。例如: -- Column with `filenum = 1` has files `relfilenode`, `relfilenode.1` .. `relfilenode.127`. -- Column with `filenum = 2` has files `relfilenode.128`, `relfilenode.129` .. `relfilenode.255`. -- Column with `filenum = 3` has files `relfilenode.256`, `relfilenode.257` .. `relfilenode.383`. +- 若 `filenum = 1`,则文件名为 `relfilenode`、`relfilenode.1` ... `relfilenode.127`。 +- 若 `filenum = 2`,则文件名为 `relfilenode.128`、`relfilenode.129` ... `relfilenode.255`。 +- 若 `filenum = 3`,则文件名为 `relfilenode.256`、`relfilenode.257` ... `relfilenode.383`。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attribute.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attribute.md index ec393a6cbf..80fa2799a8 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attribute.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attribute.md @@ -4,35 +4,35 @@ title: pg_attribute # pg_attribute -The `pg_attribute` table in the `pg_catalog` schema stores information about table columns. There will be exactly one `pg_attribute` row for every column in every table in the database. (There will also be attribute entries for indexes, and all objects that have `pg_class` entries.) The term attribute is equivalent to column. +`pg_catalog` 模式里的 `pg_attribute` 表,是用来存表里列的信息的。数据库里每个表的每一列,在这个表里都有一行对应。(不只是表,索引和在 `pg_class` 里有记录的对象,也都会有对应的属性记录。)在这里,“属性”和“列”是一个意思。 -In a dropped column's `pg_attribute` entry, `atttypid` is reset to zero, but `attlen` and the other fields copied from `pg_type` are still valid. This arrangement is needed to address the situation where the dropped column's data type was later dropped, and so there is no `pg_type` row anymore. `attlen` and the other fields can be used to interpret the contents of a row of the table. +如果某列被删除了,它在 `pg_attribute` 里的记录,`atttypid` 会被改成零,但 `attlen` 和其他从 `pg_type` 拷贝过来的字段还是有效的。这是为了应对一种情况:如果被删除列的数据类型后来也被删了,那 `pg_type` 里就找不到对应的记录了。这种时候,`attlen` 和其他字段就能用来解释表里一行的内容。 -|Column|Type|References|Description| -|------|----|----------|-----------| -|`attrelid`|oid|`pg_class.oid`|The table this column belongs to.| -|`attname`|name| |The column name.| -|`atttypid`|oid|`pg_type.oid`|The data type of this column.| -|`attstattarget`|integer| |Controls the level of detail of statistics accumulated for this column by `ANALYZE`. A zero value indicates that no statistics should be collected. A negative value says to use the system default statistics target. The exact meaning of positive values is data type-dependent. For scalar data types, it is both the target number of "most common values" to collect, and the target number of histogram bins to create.| -|`attlen`|smallint| |A copy of `pg_type.typlen` of this column's type.| -|`attnum`|smallint| |The number of the column. Ordinary columns are numbered from 1 up. System columns, such as `ctid`, have (arbitrary) negative numbers.| -|`attndims`|integer| |Number of dimensions, if the column is an array type; otherwise `0`. (Currently, the number of dimensions of an array is not enforced, so any nonzero value effectively means it is an array.)| -|`attcacheoff`|integer| |Always `-1` in storage, but when loaded into a row descriptor in memory this may be updated to cache the offset of the attribute within the row.| -|`atttypmod`|integer| |Records type-specific data supplied at table creation time (for example, the maximum length of a `varchar` column). It is passed to type-specific input functions and length coercion functions. The value will generally be `-1` for types that do not need it.| -|`attbyval`|boolean| |A copy of `pg_type.typbyval` of this column's type.| -|`attstorage`|char| |Normally a copy of `pg_type.typstorage` of this column's type. For TOAST-able data types, this can be altered after column creation to control storage policy.| -|`attalign`|char| |A copy of `pg_type.typalign` of this column's type.| -|`attnotnull`|boolean| |This represents a not-null constraint. | -| `attcompression` | char | | Compression type for this column. Valid values are `n` for none, `r` for run-length encoding, `z` for zlib, `q` for quicklz, and `s` for snappy. | -|`atthasdef`|boolean| |This column has a default expression or generation expression, in which case there will be a corresponding entry in the `pg_attrdef` catalog that actually defines the value. (Check `attgenerated` to determine whether this is a default or a generation expression.)| -|`atthasmissing`|boolean| |This column has a value which is used where the column is entirely missing from the row, as happens when a column is added with a non-volatile `DEFAULT` value after the row is created. The actual value used is stored in the `attmissingval` column.| -|`attidentity`|char| |If a zero byte (''), then not an identity column. Otherwise, `a` = generated always, `d` = generated by default.| -|`attgenerated`|char| |If a zero byte (''), then not a generated column. Otherwise, `s` = stored. (Other values might be added in the future.) | -|`attisdropped`|boolean| |This column has been dropped and is no longer valid. A dropped column is still physically present in the table, but is ignored by the parser and so cannot be accessed via SQL.| -|`attislocal`|boolean| |This column is defined locally in the relation. Note that a column may be locally defined and inherited simultaneously.| -|`attinhcount`|integer| |The number of direct ancestors this column has. A column with a nonzero number of ancestors cannot be dropped nor renamed.| -|`attcollation`|oid|`pg_collation.oid`|The defined collation of the column, or zero if the is not of a collatable data type.| -|`attacl`|aclitem[]| |Column-level access privileges, if any have been granted specifically on this column.| -|`attoptions`|text[]| |Attribute-level options, as "keyword=value" strings.| -|`attfdwoptions`|text[]| |Attribute-level foreign data wrapper options, as "keyword=value" strings.| -|`attmissingval`|anyarray| |This column has a one element array containing the value used when the column is entirely missing from the row, as happens when the column is added with a non-volatile `DEFAULT` value after the row is created. The value is only used when `atthasmissing` is `true`. If there is no value the column is null.| \ No newline at end of file +| 列名 | 类型 | 引用 | 描述 | +|---------------|------------|-----------------------|--------------------------| +| `attrelid` | oid | `pg_class.oid` | 这列属于哪个表。 | +| `attname` | name | | 列的名字。 | +| `atttypid` | oid | `pg_type.oid` | 这列的数据类型。 | +| `attstattarget` | integer | | 控制 `ANALYZE` 为这列收集统计信息的详细程度。值为零表示不收集统计信息。负值表示使用系统的默认统计目标。正数值的具体含义取决于数据类型。对于标量数据类型,它既是“最常见值”的目标数量,也是直方图桶的目标数量。 | +| `attlen` | smallint | | 这列数据类型的 `pg_type.typlen` 的副本。 | +| `attnum` | smallint | | 列的编号。普通列从 1 开始编号。系统列(比如 `ctid`)则用(任意的)负数编号。 | +| `attndims` | integer | | 如果这列是数组类型,就表示维度数量;否则是 0。(目前,数组的维度数量没有强制要求,所以任何非零值都表示它是数组。) | +| `attcacheoff` | integer | | 在存储时总是 `-1`,但在把这列加载到内存里的行描述符时,可能会更新为缓存这属性在行内的偏移量。 | +| `atttypmod` | integer | | 记录在表创建时提供的类型特定数据(比如,`varchar` 列的最大长度)。它会传递给类型特定的输入函数和长度强制函数。对于不需要它的类型,值通常是 `-1`。 | +| `attbyval` | boolean | | 这列数据类型的 `pg_type.typbyval` 的副本。 | +| `attstorage` | char | | 通常是这列数据类型的 `pg_type.typstorage` 的副本。对于可 TOAST 的数据类型,可以在列创建后更改这个值来控制存储策略。 | +| `attalign` | char | | 这列数据类型的 `pg_type.typalign` 的副本。 | +| `attnotnull` | boolean | | 表示这列有非空约束。 | +| `attcompression` | char | | 这列的压缩类型。有效值包括:`n`(无压缩)、`r`(游程编码)、`z`(zlib)、`q`(quicklz)和 `s`(snappy)。 | +| `atthasdef` | boolean | | 这列有默认表达式或生成表达式,这种情况下在 `pg_attrdef` 目录里会有对应的条目来定义这个值。(检查 `attgenerated` 可以确定这是默认值还是生成表达式。) | +| `atthasmissing` | boolean | | 这列有一个值,当这列完全缺失时(比如在行创建后添加有非易失性 `DEFAULT` 值的列时)会用这个值。实际值存储在 `attmissingval` 列里。 | +| `attidentity` | char | | 如果是零字节(`''`),就不是身份列。否则,`a` 表示始终生成,`d` 表示默认生成。 | +| `attgenerated` | char | | 如果是零字节(`''`),就不是生成列。否则,`s` 表示存储。(未来可能会添加其他值。) | +| `attisdropped` | boolean | | 这列已经被删除,不再有效。被删除的列在物理上还在表里,但会被解析器忽略,所以无法通过 SQL 访问。 | +| `attislocal` | boolean | | 这列在关系里是本地定义的。注意,列可以同时本地定义并继承。 | +| `attinhcount` | integer | | 这列的直接祖先数量。有非零祖先数量的列不能被删除或重命名。 | +| `attcollation` | oid | `pg_collation.oid` | 这列定义的排序规则,如果不是可排序的数据类型就是零。 | +| `attacl` | aclitem[] | | 如果给这列授予了特定的列级访问权限,就在这里记录。 | +| `attoptions` | text[] | | 属性级选项,以“关键字=值”字符串的形式表示。 | +| `attfdwoptions` | text[] | | 属性级外部数据包装器选项,以“关键字=值”字符串的形式表示。 | +| `attmissingval` | anyarray | | 这列包含一个元素的数组,里面是当这列完全缺失时(比如在行创建后添加有非易失性 `DEFAULT` 值的列时)用的值。只有当 `atthasmissing` 是 `true` 时才用这个值。如果没有值,这列就是 `null`。 | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attridef.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attridef.md index 8a1311a24c..efbf85ca8b 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attridef.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-attridef.md @@ -4,11 +4,11 @@ title: pg_attrdef # pg_attrdef -The `pg_attrdef` table in the `pg_catalog` schema stores column default values. The main information about columns is stored in `pg_attribute`. Only columns that explicitly specify a default value (when the table is created or the column is added) will have an entry here. +`pg_catalog` 模式中的 `pg_attrdef` 表用于存储列的默认值。关于列的主要信息存储在 `pg_attribute` 表中。只有在创建表或添加列时明确指定了默认值的列,才会在此表中有记录。 -|column|type|references|description| -|------|----|----------|-----------| -|`oid`|oid| |The object ID| -|`adrelid`|oid| `pg_class.oid` |The table this column belongs to| -|`adnum`|smallint| `pg_attribute.attnum` |The number of the column| -|`adbin`|pg_node_tree| |The internal representation of the column default value| \ No newline at end of file +| 列名 | 类型 | 引用 | 描述 | +|--------|---------------|-----------------------|--------------------------| +| `oid` | oid | | 对象 ID | +| `adrelid` | oid | `pg_class.oid` | 该列所属的表 | +| `adnum`| smallint | `pg_attribute.attnum` | 列的编号 | +| `adbin`| pg_node_tree | | 列默认值的内部表示 | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-auth-members.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-auth-members.md index 14c9883b09..bbd709b502 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-auth-members.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-auth-members.md @@ -4,11 +4,11 @@ title: pg_auth_members # pg_auth_members -The `pg_auth_members` system catalog table in the `pg_catalog` schema shows the membership relations between roles. Any non-circular set of relationships is allowed. Because roles are system-wide, `pg_auth_members` is shared across all databases of a Apache Cloudberry system. +`pg_catalog` 模式中的 `pg_auth_members` 系统目录表记录了角色之间的成员关系。任何非循环的关系都是允许的。由于角色是全系统范围的,`pg_auth_members` 在 Apache Cloudberry 系统的所有数据库中都是共享的。 -|column|type|references|description| -|------|----|----------|-----------| -|`roleid`|oid|`pg_authid.oid`|ID of the parent-level (group) role| -|`member`|oid|`pg_authid.oid`|ID of a member role| -|`grantor`|oid|`pg_authid.oid`|ID of the role that granted this membership| -|`admin_option`|boolean| |True if role member might grant membership to others| +| 列名 | 类型 | 引用 | 描述 | +|--------------|--------|-----------------------|--------------------------| +| `roleid` | oid | `pg_authid.oid` | 父级(组)角色的 ID | +| `member` | oid | `pg_authid.oid` | 成员角色的 ID | +| `grantor` | oid | `pg_authid.oid` | 授予此成员关系的角色 ID | +| `admin_option` | boolean | | 如果为真,角色成员可以将成员关系授予他人 | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-authid.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-authid.md index ccf319cab0..4c5dac0047 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-authid.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-authid.md @@ -4,35 +4,35 @@ title: pg_authid # pg_authid -The `pg_authid` table in the `pg_catalog` schema contains information about database authorization identifiers (roles). A role subsumes the concepts of users and groups. A user is a role with the `rolcanlogin` flag set. Any role (with or without `rolcanlogin`) might have other roles as members. See [`pg_auth_members`](/docs/sys-catalogs/sys-tables/sys-tbl-pg-auth-members.md). +`pg_catalog` 模式中的 `pg_authid` 表记录了数据库授权标识符(角色)的信息。角色融合了用户和组的概念。用户是启用了 `rolcanlogin` 标志的角色。任何角色(无论是否启用 `rolcanlogin`)都可以包含其他角色作为成员。更多详情请查看 [`pg_auth_members`](/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-auth-members.md)。 -Because this catalog contains passwords, it must not be publicly readable. `pg_roles` is a publicly readable view on `pg_authid` that blanks out the password field. +因为这张目录表包含了密码,所以不能公开读取。`pg_roles` 是 `pg_authid` 的一个公开可读视图,它会隐藏密码字段。 -Because user identities are system-wide, `pg_authid` is shared across all databases in a Apache Cloudberry system: there is only one copy of `pg_authid` per system, not one per database. +由于用户身份是在整个系统范围内定义的,`pg_authid` 在 Apache Cloudberry 系统的所有数据库中都是共享的:每个系统只有一份 `pg_authid` 的副本,而不是每个数据库一份。 -|column|type|references|description| -|------|----|----------|-----------| -|`oid`|oid| |Row identifier| -|`rolname`|name| |Role name| -|`rolsuper`|boolean| |Role has superuser privileges| -|`rolinherit`|boolean| |Role automatically inherits privileges of roles it is a member of| -|`rolcreaterole`|boolean| |Role might create more roles| -|`rolcreatedb`|boolean| |Role might create databases| -|`rolcanlogin`|boolean| |Role might log in. That is, this role can be given as the initial session authorization identifier| -|`rolreplication`|boolean| |Role is a replication role. That is, this role can initiate streaming replication and set/unset the system backup mode using `pg_start_backup` and `pg_stop_backup`.| -|`rolbypassrls`|boolean| |Roles bypasses every row-level security policy.| -|`rolconnlimit`|int4| |For roles that can log in, this sets maximum number of concurrent connections this role can make. `-1` means no limit| -| `rolenableprofile` | `boolean` | | Role has a profile. | -|`rolpassword`|text| |Password (possibly encrypted); NULL if none. If the password is encrypted, this column will begin with the string `md5` followed by a 32-character hexadecimal MD5 hash. The MD5 hash will be the user's password concatenated to their user name. For example, if user `joe` has password `xyzzy`, Apache Cloudberry will store the md5 hash of `xyzzyjoe`. Apache Cloudberry assumes that a password that does not follow that format is unencrypted.| -|`rolvaliduntil`|timestamptz| |Password expiry time (only used for password authentication); NULL if no expiration| -| `rolprofile` | `oid` | | Object ID of the associated profile ID in `pg_profile` | -| `rolaccountstatus` | smallint | | Account status of the role. | -| `rolfailedlogins` | integer | | Number of failed login attempts. | -| `rolpasswordsetat` | timestamptz | | Time when the password was last set. | -| `rollockdate` | timestamptz | | Time when the role was locked. | -| `rolpasswordexpire` | timestamptz | | Time when the password will expire. | -|`rolresqueue`|oid| |Object ID of the associated resource queue ID in `pg_resqueue` | -|`rolcreaterextgpfd`|boolean| |Privilege to create read external tables with the `gpfdist` or `gpfdists` protocol| -|`rolcreaterexhttp`|boolean| |Privilege to create read external tables with the `http` protocol| -|`rolcreatewextgpfd`|boolean| |Privilege to create write external tables with the `gpfdist` or `gpfdists` protocol| -|`rolresgroup`|oid| |Object ID of the associated resource group ID in `pg_resgroup` | +| 列名 | 类型 | 引用 | 描述 | +|-------------------|------------|-----------------------|--------------------------| +| `oid` | oid | | 行标识符 | +| `rolname` | name | | 角色名称 | +| `rolsuper` | boolean | | 角色是否拥有超级用户权限 | +| `rolinherit` | boolean | | 角色是否会自动继承其所属角色的权限 | +| `rolcreaterole` | boolean | | 角色是否可以创建更多角色 | +| `rolcreatedb` | boolean | | 角色是否可以创建数据库 | +| `rolcanlogin` | boolean | | 角色是否可以登录,即此角色是否可以作为初始会话授权标识符 | +| `rolreplication` | boolean | | 角色是否是复制角色,即此角色是否可以启动流复制,并使用 `pg_start_backup` 和 `pg_stop_backup` 设置或取消系统备份模式 | +| `rolbypassrls` | boolean | | 角色是否绕过所有行级安全策略 | +| `rolconnlimit` | int4 | | 对于可以登录的角色,此值设置该角色可以同时建立的最大连接数。`-1` 表示无限制 | +| `rolenableprofile`| boolean | | 角色是否拥有配置文件 | +| `rolpassword` | text | | 密码(可能是加密的);如果没有密码则为 NULL。如果密码是加密的,该列将以字符串 `md5` 开头,后面跟着一个 32 位的十六进制 MD5 哈希值。该 MD5 哈希值是用户的密码与用户名拼接后的哈希值。例如,如果用户 `joe` 的密码是 `xyzzy`,Apache Cloudberry 将存储 `xyzzyjoe` 的 MD5 哈希值。Apache Cloudberry 假设不符合该格式的密码是未加密的 | +| `rolvaliduntil` | timestamptz | | 密码过期时间(仅用于密码认证);如果没有过期时间则为 NULL | +| `rolprofile` | oid | | 关联的配置文件 ID 在 `pg_profile` 中的对象 ID | +| `rolaccountstatus`| smallint | | 角色的账户状态 | +| `rolfailedlogins` | integer | | 登录失败的次数 | +| `rolpasswordsetat`| timestamptz | | 密码最后设置的时间 | +| `rollockdate` | timestamptz | | 角色锁定的时间 | +| `rolpasswordexpire`| timestamptz | | 密码过期的时间 | +| `rolresqueue` | oid | | 关联的资源队列 ID 在 `pg_resqueue` 中的对象 ID | +| `rolcreaterextgpfd`| boolean | | 是否有使用 `gpfdist` 或 `gpfdists` 协议创建读取外部表的权限 | +| `rolcreaterexhttp`| boolean | | 是否有使用 `http` 协议创建读取外部表的权限 | +| `rolcreatewextgpfd`| boolean | | 是否有使用 `gpfdist` 或 `gpfdists` 协议创建写入外部表的权限 | +| `rolresgroup` | oid | | 关联的资源组 ID 在 `pg_resgroup` 中的对象 ID | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-cast.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-cast.md index ce3269f110..1ecaba481a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-cast.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-cast.md @@ -4,21 +4,21 @@ title: pg_cast # pg_cast -The `pg_cast` table in the `pg_catalog` schema stores data type conversion paths, both built-in paths and those defined with `CREATE CAST`. +`pg_catalog` 模式中的 `pg_cast` 表记录了数据类型转换路径,包括系统内置的转换路径以及通过 `CREATE CAST` 定义的路径。 -Note that `pg_cast` does not represent every type conversion known to the system, only those that cannot be deduced from some generic rule. For example, casting between a domain and its base type is not explicitly represented in `pg_cast`. Another important exception is that "automatic I/O conversion casts", those performed using a data type's own I/O functions to convert to or from `text` or other string types, are not explicitly represented in `pg_cast`. +需要注意的是,`pg_cast` 并不涵盖系统中所有已知的类型转换,仅包含那些无法从通用规则推导出来的转换。例如,域类型与其基础类型之间的转换不会在 `pg_cast` 中明确表示。另一个重要例外是“自动 I/O 转换”,即使用数据类型自身的 I/O 函数将数据转换为 `text` 或其他字符串类型的转换,也不会在 `pg_cast` 中明确表示。 -The cast functions listed in `pg_cast` must always take the cast source type as their first argument type, and return the cast destination type as their result type. A cast function can have up to three arguments. The second argument, if present, must be type `integer`; it receives the type modifier associated with the destination type, or `-1` if there is none. The third argument, if present, must be type `boolean`; it receives `true` if the cast is an explicit cast, `false` otherwise. +`pg_cast` 中列出的转换函数必须始终将转换源类型作为第一个参数类型,并将转换目标类型作为返回结果类型。转换函数最多可以有三个参数。如果存在第二个参数,其类型必须为 `integer`,它接收与目标类型关联的类型修饰符,如果没有类型修饰符则为 `-1`。如果存在第三个参数,其类型必须为 `boolean`,它在转换是显式转换时接收 `true`,否则接收 `false`。 -It is legitimate to create a `pg_cast` entry in which the source and target types are the same, if the associated function takes more than one argument. Such entries represent 'length coercion functions' that coerce values of the type to be legal for a particular type modifier value. +如果相关函数有多个参数,那么在 `pg_cast` 中创建一个源类型和目标类型相同的条目是合法的。这样的条目表示“长度强制函数”,用于将类型的值强制为特定类型修饰符值所允许的值。 -When a `pg_cast` entry has different source and target types and a function that takes more than one argument, the entry converts from one type to another and applies a length coercion in a single step. When no such entry is available, coercion to a type that uses a type modifier involves two steps, one to convert between data types and a second to apply the modifier. +当一个 `pg_cast` 条目的源类型和目标类型不同,并且相关函数有多个参数时,该条目可以在一个步骤中将一种类型转换为另一种类型,并应用长度强制。如果没有这样的条目可用,那么将值强制转换为使用类型修饰符的类型需要两个步骤:第一步是转换数据类型,第二步是应用修饰符。 -|column|type|references|description| -|------|----|----------|-----------| -|`oid`|oid||The object ID.| -|`castsource`|oid|`pg_type.oid`|OID of the source data type.| -|`casttarget`|oid|`pg_type.oid`|OID of the target data type.| -|`castfunc`|oid|`pg_proc.oid`|The OID of the function to use to perform this cast. Zero is stored if the cast method does not require a function.| -|`castcontext`|char| |Indicates what contexts the cast may be invoked in. `e` means only as an explicit cast (using `CAST` or `::` syntax). `a` means implicitly in assignment to a target column, as well as explicitly. `i` means implicitly in expressions, as well as the other cases*.*| -|`castmethod`|char| |Indicates how the cast is performed:

`f` - The function identified in the `castfunc` field is used.

`i` - The input/output functions are used.

`b` - The types are binary-coercible, and no conversion is required.| +| 列名 | 类型 | 引用 | 描述 | +|------------|--------|-----------------------|--------------------------| +| `oid` | oid | | 对象 ID | +| `castsource` | oid | `pg_type.oid` | 源数据类型的 OID | +| `casttarget` | oid | `pg_type.oid` | 目标数据类型的 OID | +| `castfunc` | oid | `pg_proc.oid` | 执行此转换所使用的函数的 OID。如果转换方法不需要函数,则存储为零 | +| `castcontext` | char | | 指示此转换可以在哪些上下文中被调用:

`e` - 仅作为显式转换(使用 `CAST` 或 `::` 语法)

`a` - 在赋值给目标列时隐式调用,以及显式调用

`i` - 在表达式中隐式调用,以及其他情况 | +| `castmethod` | char | | 指示转换的执行方式:

`f` - 使用 `castfunc` 字段中标识的函数

`i` - 使用输入/输出函数

`b` - 类型是二进制可强制转换的,无需转换 | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-class.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-class.md index 82bfb7b5e7..6c8a7287b2 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-class.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-tables/pg-class.md @@ -4,42 +4,42 @@ title: pg_class # pg_class -The system catalog table `pg_class` catalogs tables and most everything else that has columns or is otherwise similar to a table. This includes indexes (see also `pg_index`), sequences, views, materialized views, composite types, and TOAST tables. Below, when we mean all of these kinds of objects we speak of "relations". Not all columns are meaningful for all relation types. +系统目录表 `pg_class` 用于记录表以及几乎所有具有列或类似表结构的对象,包括索引(详情请参阅 `pg_index`)、序列、视图、物化视图、复合类型和 TOAST 表。在下文中,我们将这些对象统称为“关系”。需要注意的是,并非所有列对所有关系类型都有实际意义。 -|column|type|references|description| -|------|----|----------|-----------| -|`oid`|oid| |Row identifier| -|`relname`|name| |Name of the table, index, view.| -|`relnamespace`|oid| `pg_namespace.oid` |The object identifier of the namespace (schema) that contains this relation| -|`reltype`|oid| `pg_type.oid` |The object identifier of the data type that corresponds to this table's row type, if any (zero for indexes, which have no `pg_type` entry)| -|`reloftype`|oid| `pg_type.oid` |For typed tables, the object identifier of the underlying composite type, zero for all other relations| -|`relowner`|oid|`pg_authid.oid`|Owner of the relation| -|`relam`|oid|`pg_am.oid`|If this is a table or an index, the access method used (heap, B-tree, hash.)| -|`relfilenode`|bigint| |Name of the on-disk file of this relation; zero means this is a "mapped" relation whose disk file name is determined by low-level state| -|`reltablespace`|oid|`pg_tablespace.oid`|The tablespace in which this relation is stored. If zero, the database's default tablespace is implied. (Not meaningful if the relation has no on-disk file.)| -|`relpages`|int4| |Size of the on-disk representation of this table in pages (of size `BLCKSZ`). This is only an estimate used by the planner. It is updated by `VACUUM`, `ANALYZE`, and a few DDL commands such as `CREATE INDEX`.| -|`reltuples`|real| |Number of rows in the table. This is only an estimate used by the planner. It is updated by `VACUUM`, `ANALYZE`, and a few DDL commands such as `CREATE INDEX`.| -|`relallvisible`|int4| |Number of pages that are marked all-visible in the table's visibility map. This is only an estimate used by the planner. It is updated by `VACUUM`, `ANALYZE`, and a few DDL commands such as `CREATE INDEX`.| -|`reltoastrelid`|oid| `pg_class.oid` |The object identifier of the TOAST table associated with this table, `0` if none. The TOAST table stores large attributes "out of line" in a secondary table.| -|`relhasindex`|boolean| |True if this is a table and it has (or recently had) any indexes. | -|`relisshared`|boolean| |True if this table is shared across all databases in the system. Only certain system catalog tables (such as `pg_database`) are shared.| -|`relpersistence`|char| |The type of object persistence: `p` = heap or append-optimized permanent table, `u` = unlogged temporary table, `t` = temporary table.| -|`relkind`|char| |The type of object

`r` = heap or append-optimized ordinary table, `i` = index, `S` = sequence, `t` = TOAST table, `v` = view, `m` = materialized view, `c` = composite type, `f` = foreign table, `p` = partitioned table, `I` = partitioned index, `u` = uncatalogued temporary heap table, `o` = internal append-optimized segment files and EOFs, `b` = append-only block directory, `M` = append-only visibility map.| -|`relnatts`|int2| |Number of user columns in the relation (system columns not counted). There must be this many corresponding entries in `pg_attribute`. See also `pg_attribute.attnum`.| -|`relchecks`|int2| |Number of `CHECK` constraints on the table; see `pg_constraint` catalog.| -|`relhasrules`|boolean| |True if table has (or once had) rules; see `pg_rewrite` catalog.| -|`relhastriggers`|boolean| |True if table has (or once had) triggers.| -|`relhassubclass`|boolean| |True if table has (or once had) any inheritance children.| -|`relrowsecurity`|boolean| |True if table has row level security enabled; see `pg_policy` catalog.| -|`relforcerowsecurity`|boolean| |True if row level security (when enabled) will also apply to the table owner; see `pg_policy` catalog.| -|`relispopulated`|boolean| |True if relation is populated (this is true for all relations other than some materialized views).| -|`relreplident`|char| |Columns used to form "replica identity" for rows: `d` = default (primary key, if any), `n` = nothing, `f` = all columns, `i` = index with `indisreplident` set (same as nothing if the index used has been dropped).| -|`relispartition`|boolean| | True if table or index is a partition.| -|`relrewrite`|oid|`pg_class.oid` | For new relations being written during a DDL operation that requires a table rewrite, this contains the object identifier of the original relation; otherwise 0. That state is only visible internally; this field should never contain anything other than 0 for a user-visible relation.| -|`relfrozenxid`|xid| |All transaction IDs before this one have been replaced with a permanent (frozen) transaction ID in this table. This is used to track whether the table needs to be vacuumed in order to prevent transaction ID wraparound or to allow `pg_xact` to be shrunk.

The value is `0` (`InvalidTransactionId`) if the relation is not a table or if the table does not require vacuuming to prevent transaction ID wraparound. The table still might require vacuuming to reclaim disk space.| -|`relminmxid`|xid| |All multixact IDs before this one have been replaced by a transaction ID in this table. This is used to track whether the table needs to be vacuumed in order to prevent multixact ID wraparound or to allow `pg_multixact` to be shrunk. Zero (`InvalidMultiXactId`) if the relation is not a table.| -|`relacl`|aclitem[]| |Access privileges assigned by `GRANT` and `REVOKE`.| -|`reloptions`|text[]| |Access-method-specific options, as "keyword=value" strings.| -|`relpartbound`|`pg_node_tree`| |If table is a partition (see `relispartition`), internal representation of the partition bound.| +| 列名 | 类型 | 引用 | 描述 | +|-------------------|------------|-----------------------|--------------------------| +| `oid` | oid | | 行标识符 | +| `relname` | name | | 表、索引或视图的名称 | +| `relnamespace` | oid | `pg_namespace.oid` | 包含此关系的命名空间(模式)的对象标识符 | +| `reltype` | oid | `pg_type.oid` | 对应此表行类型的对象标识符(索引为零,因为索引没有 `pg_type` 条目) | +| `reloftype` | oid | `pg_type.oid` | 对于类型化表,底层复合类型的对象标识符;其他关系为零 | +| `relowner` | oid | `pg_authid.oid` | 关系的所有者 | +| `relam` | oid | `pg_am.oid` | 如果这是表或索引,使用的访问方法(堆、B 树、哈希等) | +| `relfilenode` | bigint | | 此关系的磁盘文件名;零表示这是一个“映射”关系,其磁盘文件名由低级状态决定 | +| `reltablespace` | oid | `pg_tablespace.oid` | 存储此关系的表空间。如果为零,则表示使用数据库的默认表空间。(如果关系没有磁盘文件,则此列无意义) | +| `relpages` | int4 | | 此表的磁盘表示大小(以 `BLCKSZ` 大小的页为单位)。这是仅用于规划器的估算值。它由 `VACUUM`、`ANALYZE` 以及一些 DDL 命令(如 `CREATE INDEX`)更新 | +| `reltuples` | real | | 表中的行数。这是仅用于规划器的估算值。它由 `VACUUM`、`ANALYZE` 以及一些 DDL 命令(如 `CREATE INDEX`)更新 | +| `relallvisible` | int4 | | 表的可见性映射中标记为全可见的页数。这是仅用于规划器的估算值。它由 `VACUUM`、`ANALYZE` 以及一些 DDL 命令(如 `CREATE INDEX`)更新 | +| `reltoastrelid` | oid | `pg_class.oid` | 与该表关联的 TOAST 表的对象标识符,如果没有则为 `0`。TOAST 表将大属性“离线”存储在辅助表中 | +| `relhasindex` | boolean | | 如果这是表且有(或曾有)索引,则为 `true` | +| `relisshared` | boolean | | 如果该表在系统的所有数据库中共享,则为 `true`。只有某些系统目录表(如 `pg_database`)是共享的 | +| `relpersistence` | char | | 对象持久化类型:
`p` = 永久表(堆或追加优化)
`u` = 未记录的临时表
`t` = 临时表 | +| `relkind` | char | | 对象类型:
`r` = 普通表(堆或追加优化)
`i` = 索引
`S` = 序列
`t` = TOAST 表
`v` = 视图
`m` = 物化视图
`c` = 复合类型
`f` = 外部表
`p` = 分区表
`I` = 分区索引
`u` = 未编目临时堆表
`o` = 内部追加优化段文件和 EOF
`b` = 追加仅块目录
`M` = 追加仅可见性映射 | +| `relnatts` | int2 | | 关系中的用户列数(不包括系统列)。必须有这么多对应的条目在 `pg_attribute` 中。请参阅 `pg_attribute.attnum` | +| `relchecks` | int2 | | 表上的 `CHECK` 约束数量;请参阅 `pg_constraint` 目录表 | +| `relhasrules` | boolean | | 如果表有(或曾有)规则,则为 `true`;请参阅 `pg_rewrite` 目录表 | +| `relhastriggers` | boolean | | 如果表有(或曾有)触发器,则为 `true` | +| `relhassubclass` | boolean | | 如果表有(或曾有)继承子表,则为 `true` | +| `relrowsecurity` | boolean | | 如果表启用了行级安全性,则为 `true`;请参阅 `pg_policy` 目录表 | +| `relforcerowsecurity` | boolean | | 如果行级安全性(启用时)也适用于表所有者,则为 `true`;请参阅 `pg_policy` 目录表 | +| `relispopulated` | boolean | | 如果关系已填充数据,则为 `true`(对于除某些物化视图外的所有关系,此值为 `true`) | +| `relreplident` | char | | 用于形成行的“副本标识符”的列:
`d` = 默认(如果有主键)
`n` = 无
`f` = 所有列
`i` = 设置了 `indisreplident` 的索引(如果使用的索引已被删除,则与无相同) | +| `relispartition` | boolean | | 如果表或索引是分区,则为 `true` | +| `relrewrite` | oid | `pg_class.oid` | 在需要重写表的 DDL 操作期间,对于正在写入的新关系,此字段包含原始关系的对象标识符;否则为 0。该状态仅在内部可见;对于用户可见的关系,此字段不应包含除 0 以外的任何值 | +| `relfrozenxid` | xid | | 该表中所有早于此事务 ID 的事务 ID 均已被替换为永久(冻结)事务 ID。此值用于跟踪表是否需要进行清理以防止事务 ID 回绕,或者是否可以缩小 `pg_xact` 的大小。

如果关系不是表,或者表不需要清理以防止事务 ID 回绕,则值为 `0`(`InvalidTransactionId`)。表可能仍需要清理以回收磁盘空间 | +| `relminmxid` | xid | | 该表中所有早于此多事务 ID 的多事务 ID 均已被替换为事务 ID。此值用于跟踪表是否需要进行清理以防止多事务 ID 回绕,或者是否可以缩小 `pg_multixact` 的大小。如果关系不是表,则值为零(`InvalidMultiXactId`) | +| `relacl` | aclitem[] | | 由 `GRANT` 和 `REVOKE` 分配的访问权限 | +| `reloptions` | text[] | | 访问方法特定的选项,以“关键字=值”字符串形式表示 | +| `relpartbound` | `pg_node_tree` | | 如果表是分区(请参阅 `relispartition`),分区边界的内部表示 | -Several of the Boolean flags in `pg_class` are maintained lazily: they are guaranteed to be true if that's the correct state, but might not be reset to false immediately when the condition is no longer true. For example, `relhasindex` is set by `CREATE INDEX`, but it is never cleared by `DROP INDEX`. Instead, `VACUUM` clears `relhasindex` if it finds the table has no indexes. This arrangement avoids race conditions and improves concurrency. +`pg_class` 中的许多布尔标志是懒惰维护的:如果这是正确的状态,则保证为 `true`,但如果条件不再成立,则可能不会立即重置为 `false`。例如,`relhasindex` 由 `CREATE INDEX` 设置,但从未由 `DROP INDEX` 清除。相反,如果 `VACUUM` 发现表没有索引,则会清除 `relhasindex`。这种安排避免了竞争条件并提高了并发性。 From c5db7d25487adc444e0eac9774a1944b4a2d3eaf Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Fri, 21 Feb 2025 15:14:16 +0800 Subject: [PATCH 13/13] add sidebars --- docs/sys-catalogs/sys-table-overview.md | 38 ------------------- docs/sys-catalogs/sys-view-overview.md | 0 .../current.json | 8 ++++ .../sys-catalogs/sys-table-overview.md | 38 ------------------- .../current/sys-catalogs/sys-view-overview.md | 0 sidebars.ts | 32 ++++++++++++++++ 6 files changed, 40 insertions(+), 76 deletions(-) delete mode 100644 docs/sys-catalogs/sys-table-overview.md delete mode 100644 docs/sys-catalogs/sys-view-overview.md delete mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-table-overview.md delete mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-view-overview.md diff --git a/docs/sys-catalogs/sys-table-overview.md b/docs/sys-catalogs/sys-table-overview.md deleted file mode 100644 index f1900878d0..0000000000 --- a/docs/sys-catalogs/sys-table-overview.md +++ /dev/null @@ -1,38 +0,0 @@ - -[`gp_configuration_history`](/docs/sys-catalogs/sys-tables/gp-configuration-history.md) - -[`gp_distribution_policy`](/docs/sys-catalogs/sys-tables/gp-distribution-policy.md) - -[`gp_fastsequence`](/docs/sys-catalogs/sys-tables/gp-fastsequence.md) - -[`gp_id`](/docs/sys-catalogs/sys-tables/gp-id.md) - -[`gp_partition_template`](/docs/sys-catalogs/sys-tables/gp-partition-template.md) - -[`gp_segment_configuration`](/docs/sys-catalogs/sys-tables/gp-segment-configuration.md) - -[`gp_version_at_initdb`](/docs/sys-catalogs/sys-tables/gp-version-at-initdb.md) - -[`pg_aggregate`](/docs/sys-catalogs/sys-tables/pg-aggregate.md) - -[`pg_am`](/docs/sys-catalogs/sys-tables/pg-am.md) - -[`pg_amop`](/docs/sys-catalogs/sys-tables/pg-amop.md) - -[`pg_amproc`](/docs/sys-catalogs/sys-tables/pg-amproc.md) - -[`pg_appendonly`](/docs/sys-catalogs/sys-tables/pg-appendonly.md) - -[`pg_attribute_encoding`](/docs/sys-catalogs/sys-tables/pg-attribute-encoding.md) - -[`pg_attribute`](/docs/sys-catalogs/sys-tables/pg-attribute.md) - -[`pg_attridef`](/docs/sys-catalogs/sys-tables/pg-attridef.md) - -[`pg_auth_members`](/docs/sys-catalogs/sys-tables/pg-auth-members.md) - -[`pg_authid`](/docs/sys-catalogs/sys-tables/pg-authid.md) - -[`pg_cast`](/docs/sys-catalogs/sys-tables/pg-cast.md) - -[`pg_class`](/docs/sys-catalogs/sys-tables/pg-class.md) diff --git a/docs/sys-catalogs/sys-view-overview.md b/docs/sys-catalogs/sys-view-overview.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current.json b/i18n/zh/docusaurus-plugin-content-docs/current.json index fcad9e6076..28ed07e42e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current.json +++ b/i18n/zh/docusaurus-plugin-content-docs/current.json @@ -62,5 +62,13 @@ "sidebar.docsbars.category.Advanced Analytics": { "message": "高级数据分析", "description": "The label for category advanced analytics in sidebar docs" + }, + "sidebar.docsbars.category.System Catalogs": { + "message": "系统目录", + "description": "The label for category system catalogs in sidebar docs" + }, + "sidebar.docsbars.category.System Tables": { + "message": "系统表", + "description": "The label for category system tables in sidebar docs" } } diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-table-overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-table-overview.md deleted file mode 100644 index f1900878d0..0000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-table-overview.md +++ /dev/null @@ -1,38 +0,0 @@ - -[`gp_configuration_history`](/docs/sys-catalogs/sys-tables/gp-configuration-history.md) - -[`gp_distribution_policy`](/docs/sys-catalogs/sys-tables/gp-distribution-policy.md) - -[`gp_fastsequence`](/docs/sys-catalogs/sys-tables/gp-fastsequence.md) - -[`gp_id`](/docs/sys-catalogs/sys-tables/gp-id.md) - -[`gp_partition_template`](/docs/sys-catalogs/sys-tables/gp-partition-template.md) - -[`gp_segment_configuration`](/docs/sys-catalogs/sys-tables/gp-segment-configuration.md) - -[`gp_version_at_initdb`](/docs/sys-catalogs/sys-tables/gp-version-at-initdb.md) - -[`pg_aggregate`](/docs/sys-catalogs/sys-tables/pg-aggregate.md) - -[`pg_am`](/docs/sys-catalogs/sys-tables/pg-am.md) - -[`pg_amop`](/docs/sys-catalogs/sys-tables/pg-amop.md) - -[`pg_amproc`](/docs/sys-catalogs/sys-tables/pg-amproc.md) - -[`pg_appendonly`](/docs/sys-catalogs/sys-tables/pg-appendonly.md) - -[`pg_attribute_encoding`](/docs/sys-catalogs/sys-tables/pg-attribute-encoding.md) - -[`pg_attribute`](/docs/sys-catalogs/sys-tables/pg-attribute.md) - -[`pg_attridef`](/docs/sys-catalogs/sys-tables/pg-attridef.md) - -[`pg_auth_members`](/docs/sys-catalogs/sys-tables/pg-auth-members.md) - -[`pg_authid`](/docs/sys-catalogs/sys-tables/pg-authid.md) - -[`pg_cast`](/docs/sys-catalogs/sys-tables/pg-cast.md) - -[`pg_class`](/docs/sys-catalogs/sys-tables/pg-class.md) diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-view-overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-catalogs/sys-view-overview.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sidebars.ts b/sidebars.ts index af96165a1f..1aa4ab9aad 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -377,6 +377,38 @@ const sidebars: SidebarsConfig = { 'sys-utilities/dropuser', 'sys-utilities/gpactivatestandby'] }, + + { + type: 'category', + label: 'System Catalogs', + items: [ + { + type: 'category', + label: 'System Tables', + items: [ + 'sys-catalogs/sys-tables/gp-configuration-history', + 'sys-catalogs/sys-tables/gp-distribution-policy', + 'sys-catalogs/sys-tables/gp-fastsequence', + 'sys-catalogs/sys-tables/gp-id', + 'sys-catalogs/sys-tables/gp-partition-template', + 'sys-catalogs/sys-tables/gp-segment-configuration', + 'sys-catalogs/sys-tables/gp-version-at-initdb', + 'sys-catalogs/sys-tables/pg-aggregate', + 'sys-catalogs/sys-tables/pg-am', + 'sys-catalogs/sys-tables/pg-amop', + 'sys-catalogs/sys-tables/pg-amproc', + 'sys-catalogs/sys-tables/pg-appendonly', + 'sys-catalogs/sys-tables/pg-attribute', + 'sys-catalogs/sys-tables/pg-attribute-encoding', + 'sys-catalogs/sys-tables/pg-attridef', + 'sys-catalogs/sys-tables/pg-auth-members', + 'sys-catalogs/sys-tables/pg-authid', + 'sys-catalogs/sys-tables/pg-cast', + 'sys-catalogs/sys-tables/pg-class' + ] + } + ] + }, ] },