Updated on 2024-09-03 GMT+08:00

New Features in 8.2.1

For details about the new features of version 8.2.1.x (released only for whitelisted users), see New Features in 8.2.1. For details about the resolved issues of each patch, see New Features and Resolved Issues in 8.2.1.x.

[V8.2.1.225 Release Date] July 2024

[V8.2.1.223 Release Date] June 2024

[V8.2.1.220 Release Date] April 2024

[V8.2.1.119 Release Date] February 2024

[V8.2.1.100 Release Date] May 2023

New Features

Table 1 8.2.1 Feature changes

Feature

Description

Reference

Improved usability of the resource management function: Added the global memory control and adjustment mechanism, added top SQL statements and views to query the skews of disk space occupation of different DNs.

  • The GUC parameter enable_global_memctl is added to control whether to enable the global memory management function.
  • stmt_type can be recorded to facilitate aggregate analysis on SQL statements.
  • The PGXC_WLM_TABLE_DISTRIBUTION_SKEWNESS view is added to display data skews of tables in the current database.
  • "GUC Parameters > Load Management" in Developer Guide
  • "System Catalogs and System Views > System Views >GS_WLM_SESSION_HISTORY/GS_WLM_SESSION_STATISTICS" in Developer Guide. The stmt_type field is added to display the query types of statements.
  • "System Catalogs and System Views > System Views > PGXC_WLM_TABLE_DISTRIBUTION_SKEWNESS" in Developer Guide

Network I/O management and control based on resource pools

  • The enable_libcomm_schedule parameter is added to control whether to enable network management and control.

    The low_priority_bandwidth parameter is added to specify the upper limit of the network bandwidth that can be occupied by low-priority queues. This parameter is used to control the network flows of low-priority queues.

  • The send_speed and recv_speed fields are added to the following system catalogs and views to indicate the average sending/receiving rate in the monitoring period:

    System catalog:

    GS_RESPOOL_RESOURCE_HISTORY

    GS_WLM_USER_RESOURCE_HISTORY

    System Views:

    GS_RESPOOL_RESOURCE_INFO

    PG_TOTAL_USER_RESOURCE_INFO

    PGXC_RESPOOL_RESOURCE_INFO

    PGXC_RESPOOL_RESOURCE_HISTORY

    PGXC_TOTAL_USER_RESOURCE_INFO

    PGXC_WLM_USER_RESOURCE_HISTORY

  • The | BANDWIDTH = VALUE,| ACTION = ['abort' | 'penalty'] syntax is added to the ALTER EXCEPT RULE/CREATE EXCEPT RULE syntax. The parameter bandwidth sets the maximum network bandwidth that can be used for job execution.
  • The | weight=bandwidth_weight syntax is added to the ALTER RESOURCE POOL/CREATE RESOURCE POOL syntax. The parameter weight specifies the network bandwidth weight of a resource pool.
  • "GUC Parameters > Resource Management" in Developer Guide
  • "System Catalogs and System Views" in Developer Guide
  • "DDL Syntax > ALTER EXCEPT RULE/CREATE EXCEPT RULE" in SQL Syntax Reference
  • "DDL Syntax > ALTER RESOURCE POOL/CREATE RESOURCE POOL" in SQL Syntax Reference

Exception rules (resource limit for a single SQL statement)

  • The short_acc, except_rule, and weight fields are added to PG_RESOURCE_POOL.
  • The parameter except_info is added to GS_WLM_SESSION_HISTORY/GS_WLM_SESSION_STATISTICS to display information about exception rules triggered by statements.
  • "System Catalogs and Views > System Catalogs > PG_RESOURCE_POOL" in Developer Guide
  • "System Catalogs and System Views > System Views > GS_WLM_SESSION_HISTORY/GS_WLM_SESSION_STATISTICS" in Developer Guide

By default, &level is set to perf for TopSQL clauses to monitor clauses of stored procedures, optimize internal statements of stored procedures, and locate faults.

The GUC parameter resource_track_subsql_duration is added to filter the minimum execution time of clauses in a stored procedure.

  • "GUC Parameters > Resource Management" in Developer Guide
  • "Resource Monitoring > Real-Time Top SQL/Historical Top SQL" in Developer Guide

Enhanced the communication capability. Added the GUC parameter conn_recycle_timeout to automatically reclaim idle connections.

The GUC parameter conn_recycle_timeout is added to specify the interval for reclaiming idle connections between CNs and DNs to the connection pool.

"GUC Parameters > Connection and Authentication > Communication Library Parameters" in Developer Guide

Administrators can use SQL functions to query process stack information for service problem demarcation and analysis.

The gs_stack() function is added to obtain the stack information of CN or DN processes.

"Functions and Operators > Statistics Information Functions" in SQL Syntax Reference

Path pruning optimization in complex scenarios

  • The GUC parameter prefer_hashjoin_path is added to control whether to preferentially generate the hash join path.
  • The prefer_hashjoin_path parameter is added to the parameters supported by GUC hints.
  • "GUC Parameters> Query Planning> Optimizer Method Configuration" in Developer Guide
  • "Query Performance Optimization > Query Improvement > Hint-based Tuning > Configuration Parameter Hints" in Developer Guide

Top SQL optimization at the perf level

  • The GUC parameter time_track_strategy is added to set the policy for collecting the execution time of the operators of the current session.
  • The views show_tsc_info, show_all_tsc_info, get_tsc_info and get_all_tsc_info are added to query the TSC information of the current node and all nodes.
  • The functions show_tsc_info(), get_tsc_info() and test_tsc_info are added to query the TSC information of the current node and all nodes.
  • "GUC Parameters > Resource Management > time_track_strategy" in Developer Guide
  • "System Catalogs and System Views > System Views" in Developer Guide
  • "Functions and Operators > System Administration Functions > Other Functions" in SQL Syntax Reference

share scan for multiple count (distinct) expressions

  • The GUC parameter stream_ctescan_pred_threshold is added to control the minimum number of filter criteria contained in a CTE.
  • The stream_ctescan_max_estimate_mem parameter is added to control the maximum estimated memory value of the CTE.
  • The GUC parameter stream_ctescan_refcount_threshold is added to control the maximum number of times that the CTE can be referenced.

"GUC Parameters > Query Planning > Other Optimizer Options" in the Developer Guide

All non-aggregation function query fields do not need to be displayed after GROUP BY.

The disable_full_group_by_mysql option is added to the GUC parameter behavior_compat_options to control whether the non-aggregation function query fields can be partially displayed after GROUP BY in the query.

"GUC Parameters > Miscellaneous Parameters > behavior_compat_options" in Developer Guide

Optimized DISCARD

The keyword { ALL | TEMP | TEMPORARY | PLANS | SEQUENCES } is added to the syntax to release all temporary resources related to the current session, resources related to all temporary tables in the current session, cached query plans, and status related to all cached sequences.

"DDL Syntax > DISCARD" in SQL Syntax Reference

The interface function read_global_var is added.

The read_global_var interface function is added to read the current value of a global variable.

"Functions and Operators > System Management Functions > Configuration Setting Functions" in SQL Syntax Reference

Optimized skew value comparison

When Detail is enabled, the execution plan displays the time required for skew value comparison.

"DML Syntax>EXPLAIN" in SQL Syntax Reference

postgis upgrade

  • Added the method of installing PostGIS-3.2.2.
  • PostGIS3.2.2 does not support raster-related functions.
  • PostGIS 3.2.2 depends on the following third-party open-source software:

    Geos-3.11.0, Proj-6.0.0, Json 0.12.1, Libxml2 2.7.1, Sqlite3

  • Added the list of operators and functions supported by PostGIS 3.2.2.
  • "PostGIS Extension > PostGIS Overview" in Developer Guide
  • "PostGIS Extension > PostGIS Installation" in Developer Guide
  • "PostGIS Extension > PostGIS Support and Restrictions" in Developer Guide

pgxc_wlm_session_statistics and explain SQL support unique_sql_id.

The unique_sql_id field is added to the GS_WLM_SESSION_HISTORY view to indicate the normalized unique SQL IDs.

"System View > GS_WLM_SESSION_HISTORY" in Developer Guide

The arrays generated by the IN/ANY/ALL condition can be split into common expressions for execution.

The GUC parameter enable_array_optimization is added to determine whether to split the arrays generated by the IN, ANY, and ALL conditions into common expressions for execution.

"GUC Parameters > Query Planning > Other Optimizer Options" in Developer Guide

Optimized the rewriting of multi-column count(distinct) to support rewriting of volatile functions.

A value is added to GUC parameter volatile_shipping_version. The default value is changed from 2 to 3.

"GUC Parameters > Query Planning > Other Optimizer Options" in Developer Guide

Removed the restriction that a maximum of 10 skew optimization values are allowed.

The GUC parameter max_skew_num is added to control the number of skew values allowed by the optimizer for redistribution optimization.

"GUC Parameters > Query Planning > Other Optimizer Options" in Developer Guide

Optimized pushdown of some conditions in a foreign table for collaborative analysis.

The option disable_gc_fdw_filter_partial_pushdown is added to the GUC parameter behavior_compat_options to control the pushdown of filter criteria used to query data in the collaborative analysis foreign table (type: gc_fdw).

"GUC Parameters > Query Planning > Other Optimizer Options" in Developer Guide

Added data set verification for the collaborative analysis operators.

The gc_fdw_verify_option parameter is added to control whether to enable the logic for verifying the number of rows in the result set in the collaborative analysis feature.

"GUC Parameters > Developer Options" in Developer Guide

Concurrent truncate, exchange, and select operations

The options of the GUC parameter ddl_select_concurrent_mode is updated. The default value is changed to none. The exchange option is added. The parameter type is changed from single-enumerated type to multi-enumerated type. Multiple values can be set at the same time. Different values are separated by commas (,).

"GUC Parameters > Lock Management" in Developer Guide

Optimized the GTM thread pool to improve the GTM's capability of handling high concurrency.

Added the following GUC parameters: gtm_option, defer_xid_cleanup_time,

gtm_enable_threadpool, and gtm_num_thread

"GUC Parameters > Cluster Transaction Parameters" in Developer Guide

"GUC Parameters > GTM Parameters" in Developer Guide

Empty files can be generated when empty tables are exported from GaussDB(DWS) to xsky S3.

The obs_null_file parameter is added to import and export empty files between GaussDB(DWS) and OBS.

"DDL Syntax > CREATE FOREIGN TABLE (OBS Import and Export)" in SQL Syntax Reference

Improved autovacuum usability.

  • The GUC parameter enable_pg_stat_object is added to control whether the autovacuum updates the system catalogs.
  • The PG_STAT_OBJECT system catalog is added to store table statistics and autovacuum efficiency information of the current instance.
  • The system view PGXC_STAT_OBJECT displays the table statistics and autovacuum efficiency information of all instances in the cluster.
  • "GUC Parameters > Automatic Cleanup" in Developer Guide
  • "System Catalogs and System Views > System Catalogs > PG_STAT_OBJECTS" in Developer Guide
  • "System Catalogs and System Views > System Views > PGXC_STAT_OBJECT" in Developer Guide

Optimize the cost of scanning column-store table indexes.

(8.2.1.100)

The GUC parameter index_selectivity_cost is added to control the cost calculation of cbtree during index scanning of column-store tables.

"GUC Parameters > Query Planning > Optimizer Method Configuration" in Developer Guide

The autovacuum lock of the column-store delta table is upgraded to resolve the error of adms import.

The GUC parameter enable_mergelock_upgrade is added to control whether to upgrade the lock level from 4 to 7 during merge of column-store delta tables, preventing errors caused by concurrent service operations.

"GUC Parameters > Lock Management" in Developer Guide

If no index type is specified for a column-store table, a B-tree index is created by default.

The GUC parameter default_table_behavior is added to specify the default table behavior.

"GUC Parameters > Developer Options" in Developer Guide

DFX view for resource monitoring (8.2.1.100)

Added the following views:

  • GS_QUERY_MONITOR displays the running/queuing information and resource usage of ongoing queries. Only queuing and running jobs are displayed.
  • GS_RESPOOL_MONITOR displays the running information and resource usage of all resource pool jobs.
  • GS_USER_MONITOR displays the job running information and resource usage of all users.

"System Catalogs and System Views > System Views" in Developer Guide

The bind monitoring function is added for top SQL statements when BEs are used in batches. (8.2.1.100)

  • For a main statement that is not spilled to disks, its record in the top SQL history table is displayed only when the next job is delivered.
  • Added a restriction to the query_plan column in the GS_WLM_SESSION_HISTORY and GS_WLM_SESSION_STATISTICS views: Execution plans are shown for DML statements but not for DDL statements. When a user issues a Parse Bind Execute (PBE) batch statement, the execution plan for the PBE statement should include the number of data bindings and be displayed as a percentage under PBE bind times.
  • "Resource Monitoring" > "Real-Time Top SQL" in the Developer Guide
  • "System Catalogs and System Views > System Views > GS_WLM_SESSION_HISTORY/GS_WLM_SESSION_STATISTICS" in Developer Guide

comm_max_stream can be dynamically set.

(8.2.1.100)

The type of the GUC parameter comm_max_stream is changed from POSTMASTER to SIGHUP. The value range is changed from 1-60000 to 1-65535. The default value is changed to 1024.

"GUC Parameters > Connection and Authentication > Communication Library Parameters" in Developer Guide

Enhanced audit log functions (8.2.1.100). The object name, field name, operation type, number of returned records, and error code columns are added.

  • The GUC parameter audit_object_details is added to control whether to record the object_details field in audit logs. This field records the table name, column name, and column type in the audit statement.
  • The object_details field is added to the pg_query_audit() function to record the columns involved in the statement and their usage types. The result_rows field indicates the number of records returned after the statement is executed. The error_code field indicates the error code when an error occurs during statement execution.

    The pg_query_audit_details() function is added for viewing audit logs and parsing the object_name and object_details fields in audit logs from the JSON format.

  • "GUC Parameters> Auditing> Audit Switch" in Developer Guide
  • "Functions and Operators> Security Functions" in SQL Syntax Reference

Multiple masking policies for a single table (8.2.1.100)

  • The policy_name (indicating the masking policy name) is added to the REDACTION_COLUMNS view. The policy_oid field is added to the PG_REDACTION_COLUMN system catalog to indicate the OID of the masking policy. This field is used to search for masking column information from the metadata in the system catalog. The policy_order field is added to the PG_REDACTION_POLICY system catalog to indicate the masking policy sequence.
  • The AFTER | BEFORE parameter is added to CREATE REDACTION POLICY to specify the relative position of the current policy.
  • "System Catalogs and System Views > REDACTION_COLUMNS/PG_REDACTION_COLUMN/PG_REDACTION_POLICY" in Developer Guide
  • "DDL Syntax > CREATE REDACTION POLICY" in SQL Syntax Reference

Optimized the 1 GB limit for column-store autovacuum. (8.2.1.100)

The GUC parameter col_min_file_size is added to resolve the following issue: A large amount of dirty data is generated when a column-store table is imported to the database. Space reclamation cannot be triggered if the file size does not exceed 1 GB.

"GUC Parameters > Automatic Cleanup" in Developer Guide

GB18030 code upgrade (8.2.1.100)

The description of common encoding formats is added to the description of the encoding parameter. The encoding format GB18030_2022 is added to Dataencoding to solve the error of exporting data in the GB18030 (earlier version) format.

  • "DDL Syntax > CREATE FOREIGN TABLE (for GDS Import and Export)" in SQL Syntax Reference
  • "DML Syntax > COPY" in SQL Syntax Reference

Core last word tool (8.2.1.100)

The GUC parameter enable_ffic_log is added, which provides a lightweight log solution to quickly and efficiently record core dump, providing necessary information for core dump fault locating and demarcation, without relying on the gdb tool.

"GUC Parameters > Resource Management" in Developer Guide

Delta table information view for Hstore tables (8.2.1.100)

The pgxc_get_hstore_delta_info(rel_name text) function is added to quickly query delt table information (such as the number of records of each type and the size of the delta table) to help locate faults.

"Hybrid Data Warehouse > Hybrid Data Warehouse Functions" in Developer Guide

Modified the copy error tolerance table (8.2.1.100)

  • The columnname, errcode, and queryid columns are added to the public.pgxc_copy_error_log table.
  • Canceled the restriction on the LOG ERRORS DATA parameter: Only users with the supper permission can use the LOG ERRORS DATA parameter.
  • The max_copy_data_display parameter is added.

The following modifications are made to the copy fault tolerance table of GaussDB(DWS):

  1. The restriction is removed: Only the administrator can modify the rawrecord field in the original data of the error table.
  2. If the not null constraint is violated, an error is reported and recorded in the error table.
  3. Error fields and error codes are displayed to facilitate fault locating when wide tables are imported to the database.
  • "System Management Functions > Other Functions" in SQL Syntax Reference
  • "DML Syntax > COPY" in SQL Syntax Reference
  • "GUC Parameters > Parallel Import" in Developer Guide

Enhanced hot and cold tables (8.2.1.100)

The user functions refresh_hot_storage(text) and refresh_hot_storage(text) are added for cold and hot tables.

refresh_hot_storage(text, text) is used to refresh the partition data of a specified multi-temprature table to OBS.

"Functions and Operators > Database Object Functions > Hot and Cold Table User Functions" in SQL Syntax Reference

Index scan (8.2.1.100)

The GUC parameter index_cost_limit is added to repair the forward compatibility of column-store indexcost and avoid the default plan change.

"GUC Parameters > Optimizer Method Configuration" in Developer Guide

Cache size of a sequence can be modified (8.2.1.100).

The CACHE keyword is added to the ALTER SEQUENCE syntax to specify the number of sequence numbers to be allocated and store the numbers in the memory for faster sequence access.

"DDL Syntax > ALTER TABLE" in SQL Syntax Reference

Removed the restriction on the number of merge partitions (8.2.1.100).

Remove the restriction on the maximum number of source partitions in the merge_clause clause.

"DDL Syntax > ALTER TABLE PARTITION" in SQL Syntax Reference

SQL Syntax Changes

Table 2 SQL syntax changes

Change Type

No.

Item

Description

Added

1

obs_null_file

The table-level parameter obs_null_file is added for management and control. When this parameter is set to on, an error is reported when a non-existent file or an invalid path is detected during the import process into GaussDB(DWS).

2

replace_illegal_chars

The GDS foreign table option replace_illegal_chars is added to replace 0x00 import.

3

DISCARD GLOBAL TEMP [TABLE]

Clears global temporary tables within the current session. When executed without specifying a table name, it will remove all global temporary tables associated with the session. If a specific table name is provided, only that particular global temporary table will be cleared.

4

ALTER SEQUENCE [ IF EXISTS ] name CACHE cache

The cache value of a sequence can be changed.

5

CREATE STATISTICS

Creates an extended statistics object for a table.

6

DROP STATISTICS

Deletes an extended statistics record.

7

ALTER STATISTICS

The ALTER syntax for extended statistics is added.

8

The keyword MASKED is added to ALTER FUNCTION.

Added the syntax for setting whether a function supports non-masking.

9

last_value ignore nulls

The last_value ignore nulls syntax is added to exclude NULL values during calculations.

10

ALTER MATERIALIZED VIEW qualified_name OWNER TO RoleId

Changes the owner of the materialized view.

11

CREATE MATERIALIZED VIEW

Creates a materialized view.

12

ALTER MATERIALIZED VIEW

Modifies the properties of a materialized view.

13

DROP MATERIALIZED VIEW

Deletes a materialized view.

14

REFRESH MATERIALIZED VIEW

Refreshes a materialized view.

Modified

15

UNIQUE NULLS NOT DISTINCE and UNIQUE NULLS IGNORE

UNIQUE NULLS NOT DISTINCE and UNIQUE NULLS IGNORE are prohibited for use when defining a foreign table. The unique constraints applied to foreign tables serve only as informational constraints and do not result in the creation of an underlying index. Therefore, these settings, which pertain to the treatment of NULL values in unique constraints, are inapplicable in this context.

16

MERGE INTO is prohibited for views containing triggers

When a view contains a trigger and a MERGE INTO operation is performed, the view remains unaltered. It is advisable to avoid using MERGE INTO in such cases.

17

discard all, discard temp, discard sequences, and discard plans

These parameters are used to release temporary resources related to the current session and reset them to the initial state.

18

CREATE/ALTER RESOURCE POOL

The weight option is added to set the network weight.

19

CREATE/ALTER EXCEPT RULE

Added the bandwidth exception identification and penalty behaviors for exception handling.

20

LOCK [ TABLE ] {[ ONLY ] name [, ...]| {name [ * ]} [, ...]} [ IN <lockmode> MODE ] [ NOWAIT ] [LOCAL COORDINATOR ONLY];

The 8.2.0 version introduces syntax specifically for locking the local CN. Initially, it supports only the ACCESS SHARE lock mode. Following this update, the system accommodates all eight levels of lock modes.

21

[BEFORE | AFTER] old_policy_name for CREATE REDACTION POLICY

The new [BEFORE|AFTER] old_policy_name option has been added. If not specified, the default behavior is to create the new policy subsequent to the one with the highest policy_order for the given table object.

22

timestampdiff()

The problem that the result is incorrect when the time difference is negative is resolved.

23

In full join scenarios, the check scope of volatile function rewriting is narrowed down.

In scenarios involving a full join across multiple tables, the current version streamlines the process by examining only the volatile attribute of functions following the ON condition. Additionally, previous limitations on the rewriting of certain volatile functions have been lifted.

24

merge into

Partitions can be specified.

Keywords

Table 3 Keywords

Change Type

No.

Item

Description

Added

1

FACT

The keyword FACT is added to the HINT syntax. Consequently, the FACT cannot be used as an alias within HINT.

2

LIGHT

A non-reserved keyword LIGHT has been added to the Analyze (light) table statement to indicate that dynamic sampling is initiated manually.

System Catalogs

Table 4 System catalogs

Change Type

No.

Item

Description

Added

1

PG_STAT_OBJECT

Thread statistics and autovacuum effect are recorded to the pg_stat_object system catalog.

2

PG_PLAN_BASELINE

The binding relationships between SQL statements and plans are save in this catalog

3

PG_PROC_REDACT

A system catalog is added to record the manual non-masking functions.

Modified

4

GS_WLM_SESSION_INFO

The stmt_type field is added to identify the query statement type.

5

GS_RESPOOL_RESOURCE_HISTORY

The network sending and receiving rate monitoring metrics send_speed and recv_speed are added.

6

GS_WLM_USER_RESOURCE_HISTORY

The network sending and receiving rate monitoring metrics send_speed and recv_speed are added.

7

PG_REDACTION_POLICY

The policy_order field is added to record the priority of masking policies associated with the same table object. A larger sequence number indicates a later creation and a higher priority.

8

PG_REDACTION_COLUMN

The policy_oid field is added to record the masking policy corresponding to the masking column details. Starting with version 8.2.1, the relationship between masking policies and masking columns is one-to-many, while the relationship between masking policies and table objects is many-to-one.

9

PG_STAT_OBJECT

Renamed the reserved field extra1 to last_autovacuum_csn.

10

GS_WLM_SESSION_INFO

The unique_plan_id, sql_hash, plan_hash and use_plan_baseline fields are added.

System Functions

Table 5 System functions

Change Type

No.

Item

Description

Added

1

SHOW_TSC_INFO()

Queries the TSC conversion information of the current node.

2

GET_TSC_INFO()

Re-acquires stable TSC conversion data for the current node without updating memory.

3

TEST_TSC_INFO(time double, loops int)

Tests time conversion accuracy with constraints: time <= 60s, 1 <= loops <= 10.

4

GET_FIRST_VALUE

Returns the first row's value from the current column.

5

READ_GLOBAL_VAR

Accesses global session-level variables (e.g., my.var).

6

GS_QUERY_PENALTY(query_id)

Implements a manual query downgrade using query_id.

7

CURRENT_TEMP_SCHEMA

Displays the temporary schema of the current session.

8

GS_WAIT_CURRENT_ACTIVE_DDL_COMPLETE

Awaits the application of GUC parameters across all threads.

9

PGXC_WAIT_CURRENT_ACTIVE_DDL_COMPLETE

Awaits the application of GUC parameters across all threads.

10

GS_SWITCH_PART_RELFILENODE

Swaps filenodes between two specified partitions.

11

REFRESH_HOT_STORAGE(text)

Transfers all data from a specified hot-cold table to OBS. The return result is the count of cold partitions on the DN.

12

REFRESH_HOT_STORAGE(text, text)

Transfers specified partition data of a hot-cold table to OBS. The return result is the count of cold partitions on the DN.

13

PG_QUERY_AUDIT_DETAILS

Invokes pgxc_query_audit or pg_query_audit to parse the object_details and object_name fields.

14

PGXC_HSTORE_DELTA_INFO

Queries HStore Delta table records and table sizes from the CN for troubleshooting.

15

COPY_PARTITION_STATS

Copies statistics from one table's partition to another without stats.

16

UPDATE_PARTITION_RELSTATS

Updates relpages and reltuples stats for a partitioned table.

17

PG_GET_STAT_EXPRESSIONS

Retrieves textual expressions from created expression statistics.

18

GS_HSTORE_COMPACTION

Initiates manual compaction of an hstore table, independent of autovacuum_compaction_rows_limit. The first parameter specifies the target table name, while the second parameter defines the small CU rows limit, defaulting to 100 if unspecified.

19

PG_SCAN_RESIDUALFILES

Scans residual files.

20

PG_GET_SCAN_RESIDUALFILES

Retrieves the list of scanned residual files.

21

PGXC_LOCK_WAIT_STATUS()

Queries cluster lock wait relationships.

22

PG_CANCEL_BACKEND (pid, msg)

Sends a custom error message when a PID session is interrupted.

23

PG_GET_STATISTICSOBJDEF

Obtains the statements for creating expression statistics.

24

PG_STAT_GET_ALL

Returns table-related tuples from pg_stat_object on the current CN. The input parameters are namespace and relname.

25

PGXC_STAT_GET_ALL

Returns table-related tuples from pg_stat_object across all CNs. The input parameters are namespace and relname.

26

PGXC_STAT_OBJECT_BYNAME

Quickly returns the relname records from pgxc_stat_object. The input parameters are namespace and relname.

27

PG_DUMP_PLANMGMT_INFO

Updates saved plans for subsequent binding, unbinding, and dropping operations.

28

PG_FOREIGN_INSERT_COMMIT

Used by the CN to deliver a rename plan to DNs when an insert operation is performed on an object in the external schema table.

29

PG_SYSTEM_WITH_TOAST_CREATE

Creates a toast table for the pg_external_namespace system catalog.

30

PG_GET_EXTERNAL_SCHEMA_TABLE_OPTIONS

Obtains the table object options of an external schema.

31

PG_GET_EXTERNAL_SCHEMA_TABLE_COL

Obtains the table column metadata of external schemas.

Modified

32

GS_WLM_REBUILD_SCHEMA_HASH(oid)

The input parameter is changed from int to OID.

33

GS_WLM_ALL_USER_RESOURCE_INFO

The network sending and receiving rate monitoring metrics send_speed and recv_speed are added.

34

GS_GET_RESPOOL_RESOURCE_INFO

The network sending and receiving rate monitoring metrics send_speed and recv_speed are added.

35

GS_WLM_USER_RESOURCE_INFO

The network sending and receiving rate monitoring metrics send_speed and recv_speed, and the input parameter username are added.

36

PG_STAT_GET_WLM_REALTIME_SESSION_INFO

The except_info column is added to display information about exception rules triggered by statements.

37

GS_TABLE_DISTRIBUTION

  • The relpersistence field is added.
    • t: local temporary table
    • g: global temporary table
    • u: unlogged table
    • p: common table
  • The sessionid field is added to indicate the session thread IDs of the global temporary table.

38

PG_FAST_TABLE_SIZE

  • The relpersistence field is added.
    • t: local temporary table
    • g: global temporary table
    • u: unlogged table
    • p: common table
  • The sessionid field is added to indicate the session thread IDs of the global temporary table.

39

PG_LIFECYCLE_TABLE_DATA_DISTRIBUTE

Updated to allow access for non-administrator users.

40

PG_QUERY_AUDIT

The object_details, result_rows, and error_code columns are added to audit logs. The pg_query_audit output parameter is modified, and three columns are added.

41

PGXC_QUERY_AUDIT

The object_details, result_rows, and error_code columns are added to audit logs. The pgxc_query_audit parameter is modified, and three columns are added.

42

GET_COL_CU_INFO

  • The dirty_percent parameter is added. The value ranges from 1 to 100. The default value is 70.
  • New column dirty_cu_count returns the count of CUs with a deletion rate above dirty_percent.

43

PG_STAT_GET_WLM_REALTIME_OPERATOR_INFO

The following fields are added: parent node ID, execution times, progress, network, and disk read/write.

44

PG_STAT_GET_WLM_REALTIME_OPERATOR_INFO

The input parameter queryid is added to query the statement information of a specified query ID.

45

TRUNC(timestamp with time zone)

The stability type is modified to stable from immutable to improve performance in certain scenarios.

46

PG_STAT_GET_WLM_REALTIME_SESSION_INFO

The stmt_type column is added to identify the statement type.

47

PG_STAT_GET_WLM_REALTIME_SESSION_INFO

The unique_sql_id field is added.

System Views

Table 6 System views

Change Type

No.

Item

Description

Added

1

SHOW_TSC_INFO

Records the TSC conversion information of the current node.

2

SHOW_ALL_TSC_INFO

Records the TSC conversion information of all nodes.

3

GET_TSC_INFO

Re-acquires stable TSC conversion data for the current node without updating memory.

4

GET_ALL_TSC_INFO

Re-acquires stable TSC conversion data for all nodes without updating memory.

5

PGXC_WLM_TABLE_DISTRIBUTION_SKEWNESS

Records disk space skew of physical tables on DNs.

6

PGXC_STAT_OBJECT

Records the pg_stat_object information of all nodes in the cluster:

7

PG_GLOBAL_TEMP_ATTACHED_PIDS

Records information about sessions of resources occupied by global temporary tables on the current node.

8

PGXC_GLOBAL_TEMP_ATTACHED_PIDS

Records information about sessions of resources occupied by global temporary tables on all nodes.

9

PG_STATS_EXT_EXPRS

Records expression statistics stored in the pg_statistic_data system catalog.

10

PV_RUNTIME_EXPRSTATS

It is created based on the pg_stat_get_runtime_exprstats function and is used to query the expression statistics generated by dynamic sampling.

11

PG_PLAN_BASELINE

Records the associations between SQL statements and plans.

12

PG_STAT_OBJECT_EXT

Accelerates the return of the query conditions in pgxc_stat_object by adding query conditions to the inner layers of pgxc_parallel_query.

Modified

13

GS_WLM_SESSION_STATISTICS

The stmt_type column is added to identify the statement type.

14

PGXC_WLM_SESSION_STATISTICS

The stmt_type column is added to identify the statement type.

15

GS_WLM_SESSION_HISTORY

The stmt_type column is added to identify the statement type.

16

GS_WLM_SESSION_INFO

The stmt_type column is added to identify the statement type.

17

PGXC_WLM_SESSION_HISTORY

The stmt_type column is added to identify the statement type.

18

PGXC_WLM_SESSION_INFO

The stmt_type column is added to identify the statement type.

19

GS_RESPOOL_RESOURCE_INFO

The network sending and receiving rate monitoring metrics send_speed and recv_speed are added.

20

PGXC_RESPOOL_RESOURCE_INFO

The network sending and receiving rate monitoring metrics send_speed and recv_speed are added.

21

PG_TOTAL_USER_RESOURCE_INFO

The network sending and receiving rate monitoring metrics send_speed and recv_speed are added.

22

PGXC_TOTAL_USER_RESOURCE_INFO

The network sending and receiving rate monitoring metrics send_speed and recv_speed are added.

23

PGXC_RESPOOL_RESOURCE_HISTORY

The network sending and receiving rate monitoring metrics send_speed and recv_speed are added.

24

PGXC_WLM_USER_RESOURCE_HISTORY

The network sending and receiving rate monitoring metrics send_speed and recv_speed are added.

25

GS_WLM_SESSION_STATISTICS/PGXC_WLM_SESSION_STATISTICS

The except_info column is added to display information about exception rules triggered by statements.

26

GS_WLM_SESSION_INFO/PGXC_WLM_SESSION_INFO

The except_info column is added to display information about exception rules triggered by statements.

27

GS_WLM_SESSION_HISTORY/PGXC_WLM_SESSION_HISTORY

The except_info column is added to display information about exception rules triggered by statements.

28

REDACTION_COLUMNS

The view definition of redaction_columns and the policy_name field is added.

29

PG_STATS

The partname field is added to indicate partitions.

30

PV_RUNTIME_ATTSTATS

The partname field is added to the pg_catalog.pv_runtime_attstats view to indicate partitions.

31

GS_WLM_OPERATOR_STATISTICS

The following fields are added: parent node ID, execution times, progress, network, and disk read/write.

32

PGXC_WLM_OPERATOR_STATISTICS

The following fields are added: parent node ID, execution times, progress, network, and disk read/write.

33

PGXC_STAT_OBJECT

Changed with pg_stat_object. The reserved field extra1 is renamed last_autovacuum_csn.

Behavior Changes

Table 7 Behavior changes

Change Type

No.

Item

Description

Added

1

Partition view dependency changes

Before 8.2.1: No view dependency for SELECT PARTITION() or PARTITION FOR() views, causing query errors.

8.2.1 and later: Partition OID dependency added. Views are rebuilt if partitions change in view decoupling scenarios and errors are reported in non-view dependency scenarios.

Modified

2

gtm_max_trans

Increased upper limit to accommodate higher thread counts for emergency streams, addressing service concurrency issues in large clusters.

3

max_process_memory

Reduced the number of CNs to half of DNs to optimize memory usage.

4

Catch-up TV process

Removed data page transaction lock from Catchup, distinguishing it from DDL. Added LwLock to serialize operations between Catchup and DDL services, preventing access to empty files.

5

Standby DN checkpoint time

Checkpoints are no longer executed after a 15 minute period. Now they are executed immediately after redo operations reach the checkpoint to reduce RTO during large Xlog imports.

6

Standby DN file closure

The home page on standby DN is forcibly closed after executing heap_xlog_newpage and seq_redo, ensuring data integrity.

7

Indexscan hints

Expanded to include indexonlyscan. When both indexscan and indexonlyscan hints are present, indexonlyscan is prioritized.

8

Case sensitivity in expressions

Discontinued support for roughcheck due to CU minmax calculations based on C sorting, which could lead to result set discrepancies.

9

Multiple count(distinct) rewriting

Changed rewriting behavior. In non-share scan scenarios, subsequent expansion is unaffected. In share scan scenarios, a stream CTE plan is generated.

10

Top SQL substatement monitoring

Monitoring approach altered from recursive to recording only the first-layer substatements.

11

ArrayLockFreeQueue

Initial memory allocation for lock-free queues capped at 1 GB.

12

Explain

The unique SQL ID is displayed in the Explain result set.

13

Explain

The unique SQL ID of "Explain + SQL statement" is the same as that of the SQL statement.

14

GS/PGXC_WLM_SESSION_STATISTICS view

Added unique SQL ID field.

15

GROUP BY query fields

  • In version 8.1.3, the query fields for non-aggregated data are filled with the min(xx) function. Starting with version 8.2.0, the system selects a random value from the column instead.
  • In version 8.2.0, query fields use non-null values for multi-column non-aggregation functions, leading to misaligned rows in the result set. In version 8.2.1, rows in the result set are aligned.

16

alter function owner to superuser

Restricted sysadmin users from changing function or stored procedure owners to a system user, except when changing from a system user to another system user.

17

Plus sign (+) connection sequence

The connection sequence of the plus sign (+) is aligned with Oracle. The original connection sequence of the plus sign (+) is related to the join association sequence. After the modification, there will be change in the join condition sequence and result set of related expressions, such as nvl expressions.

18

Concurrent updates in hstore tables

When the same row is concurrently updated in an hstore table, an error is immediately reported.

The previous behaviors are as follows: 1). If a line is concurrently updated, an error is reported after waiting. 2). If a line is concurrently delete, no errors are reported after waiting. 3). If a line is concurrently updated and deleted, an error is reported after waiting. The behaviors are changed to the same.

19

Catch-up lock level

Catchup no longer holds a level 1 lock.

20

Continuous failover logic

In consecutive failovers, data is synchronized from the secondary DN to the standby DN only for the first time.

21

Unique SQL IDs for temporary tables

Prior to version 8.2.1, temporary tables sharing the same name across different sessions had distinct schema names, resulting in distinct unique SQL IDs for each table. With the introduction of version 8.2.1, schema names in such temporary tables are standardized using fixed strings, ensuring uniform unique SQL IDs for identical SQL statements executed in different sessions.

22

Fine-grained DR in degraded state

Fine-grained DR supports backup in the degraded state of the primary cluster, expect scenarios where the primary node lacks a normal CN.

23

View decoupling

When an invalid view is accessed, the automatic rebuilding action is not triggered. The system catalog is not updated but expanded locally.

GUC Parameters

Table 8 GUC parameters

Change Type

No.

Item

Description

Added

1

time_track_strategy

Specifies the time statistics method of non-vectorized operators, including tsc, vector, timer, and frequency (debug mode)

2

max_skew_num

Controls the number of skew values allowed by the optimizer for redistribution optimization.

3

disable_full_group_by_mysql

In MySQL compatibility mode, this parameter permits non-aggregate function query fields post GROUP BY when enabled.

4

enable_col_index_vacuum

Controls autovacuum of column-store indexes, defaulted to false.

5

enable_pg_stat_object

Records the pg_stat_object system catalog when enabled; remains unrecorded when disabled.

6

conn_recycle_timeout

Determines the interval for connection reclamation.

7

index_selectivity_cost

Controls the cost calculation for cbtree during index scanning of column-store tables, applicable when the selection rate is ≥ 0.001.

8

default_table_behavior

Controls default behavior of a table. In versions earlier than 8.2.1, only column_btree_index is supported (the default index created for a column-store table is btree).

9

resource_track_subsql_duration

For TopSQL monitoring, it records substatements in stored procedures exceeding the specified threshold.

10

max_files_per_node

Limits the number of files a single query can open per node.

11

max_copy_data_display

Specifies the maximum character display for the rawrecord field in the COPY error table.

12

max_process_memory_balanced

Sets the upper limit for max_process_memory in primary/standby load balancing mode.

13

index_cost_limit

Controls the cost calculation of cbtree during column-store table index scanning (the selection rate is greater than or equal to 0.001). Hints can be set.

14

audit_object_details

Determines whether to log the object_details column in audit records.

15

enable_fd_check

Checks for incorrect FD shutdowns, enabled by default.

16

idle_in_transaction_timeout

Previously, after session_timeout was set to 0, there might be long idle connections holding table locks. To solve this problem, the transaction-level parameter idle_in_transaction_timeout is added to set the idle timeout interval for idle transaction connections.

1. It is set by users. The unit is second. The default value is 0, indicating that this function is disabled. The value ranges from 0 to 86400 (one day).

2. This parameter is valid only for client connections that are directly connected to CNs. It does not applicable to direct connections to DNs or internal connections.

3. After the value of this parameter is changed to a non-zero value, a FATAL error is reported when the transaction is in the idle state for a period longer than the specified value.

17

enable_save_dataaccess_timestamp

Records the last access time at the table level when enabled. It is disabled by default.

18

behavior_compat_options

Added check_function_shippable to the behavior_compat_options parameter. If check_function_shippable is enabled, the function ship is checked.

  1. An error occurs when attempting to push down the outer layer containing DML statements.
  2. If the outer layer can be shipped and the inner layer is immutable, no errors will be reported.
  3. No errors will be reported if both the outer and inner layers are shippable.
  4. An error will be reported if the outer layer is shippable and the inner layer is neither immutable nor shippable.

19

enable_release_scan_lock

The USERSET parameter enable_release_scan_lock is added. When this parameter is enabled, the level-1 lock is released after the statement is executed.

20

job_queue_naptime

The job_queue_naptime parameter is added to set the interval for triggering a task and the timeout interval. The default value is 1s.

21

enable_stream_sync_quit

The GUC parameter is added. By default, it is disabled to ensure that the sync quit command is not blocked.

22

enable_full_string_agg option of behavior_compat_options

The enable_full_string_agg option is added to behavior_compat_options. Enabling this parameter allows the string_agg() function to execute full aggregation within a window when used with OVER (PARTITION BY xx ORDER BY xxx). Conversely, if this parameter is disabled, string_agg() will perform incremental aggregation in the same context. By default, this parameter is set to disabled.

23

enable_cast_hashjoin option of behavior_compat_options

The enable_cast_hashjoin parameter is added to behavior_compat_options. When enabled, this parameter facilitates type conversion in JOIN conditions, such as between timestamp and timestampz, to enable efficient hash joins. By default, this parameter is disabled.

Modified

24

behavior_compat_options

The parameter DISABLE_SET_GLOBAL_VAR_ON_DATANODE has been added to the behavior_compat_options to ensure that global variables cannot be set on DNs.

25

hashjoin_spill_strategy

Policies 5 and 6 have been implemented, mirroring the functionalities of policies 0 and 1, respectively. However, there have been modifications to the latter: now, if an internal table exceeds memory capacity, it will be subdivided recursively until further division is not possible. Subsequently, the system will initiate a swap between the internal and external tables.

26

behavior_compat_options

The behavior_compat_options parameter now includes the disable_gc_fdw_filter_partial_pushdown option, which governs the filter conditions applied to foreign tables during collaborative analysis. Enabling this option means that if any condition is non-pushable, none will be pushed down. Conversely, disabling it allows for partial pushdown of conditions.

27

prefer_hashjoin_path

When the prefer_hashjoin_pathda parameter is enabled, the system prioritizes the creation of a hash join path. This may cause execution plans with the same cost to change.

28

volatile_shipping_version

The configuration now includes the value 3 to regulate the pushdown behavior of volatile functions. Meanwhile, value 2 has been updated to facilitate the pushdown of volatile functions within replicated Common Table Expressions (CTEs). Furthermore, the pushdown of volatile functions in CTEs is now disabled in scenarios where share scan is not used.

29

behavior_compat_options

The ignore_unshipped_concurrent_update option is added to control whether to ignore new tuple detection in concurrent update scenarios.

30

max_connections

The minimum value is changed from 1 to 100.

31

max_process_memory

The setting takes effect directly without depending on whether max_process_memory_auto_adjust is enabled.

32

index_selectivity_cost

The forward compatibility of column-store indexcost is rectified to prevent the default plan from changing. The default value of this parameter is changed to -1, and hints can be set.

33

behavior_compat_options

The option enable_pushdown_groupingset_subquery has been added. By default, if a subquery includes a grouping set, the outer condition is not eligible for pushdown into the subquery. However, when this parameter is enabled, it allows the outer condition to be pushed down into the subquery. It is important to verify the accuracy of the results after the pushdown is performed.

34

comm_max_stream

comm_max_stream supports reload.

35

enable_tsdb_multi_temperature

This parameter specifies whether cold and hot tables can be created for time series tables. The default value is changed to off.

36

enable_col_index_vacuum

The default value of enable_col_index_vacuum is changed to true. By default, autovacuum is allowed to clear column-store indexes.

37

enable_redistribute

This parameter controls the query optimizer's use of data transmission in local redistribute and split redistribute redistribution modes. It is not used in versions earlier than 8.2.1.

38

time_track_strategy

  • The default value of the kernel is changed to timer, and the guc parameter level is set to sighup.
  • Parameter policies are set on the OM side. After the default timer, is upgraded, if TSC is supported during, set this parameter to TSC. Otherwise, set this parameter to vector.

39

behavior_compat_options

The value enable_banker_round is added to control the use of the banker algorithm.

40

behavior_compat_options

The orderby_null_first parameter is added to determine if null values should be treated as the lowest values when performing order by sorting operations. It is important to note that this parameter is only applicable to TD-compatible databases.

41

behavior_compat_options

The parameter alter_distribute_key_by_partition is added to enable the distribution of data across partitions during an ALTER TABLE operation that uses the DISTRIBUTE BY clause. When enabled, this parameter ensures that the INSERT INTO command targets specific partitions. Conversely, disabling this parameter will maintain the default behavior, where INSERT INTO affects the entire partitioned table.

42

behavior_compat_options

The parameter enable_use_syscol_in_replicate_table is added. If this parameter is not configured, utilizing system columns such as oid, ctid, tableoid, or xc_node_id as filters, join conditions, or within the HAVING clause for operations like INSERT, UPDATE, MERGE INTO, or DELETE will trigger an error message.

43

behavior_compat_options

The parameter enable_force_add_batch is added to enhance control over batch processing. When support_batch_bind is set to on, and both enable_fast_query_shipping and enable_light_proxy are set to off, GaussDB(DWS) receives U packets in addbatch mode. It is important to be aware that this mode may lead to slower packet importation into the database, potentially resulting in memory shortages. Therefore, careful consideration is advised when configuring this parameter.

44

behavior_compat_options

The disable_update_returning_check option is added to the behavior_compat_options parameter. This addition provides control over whether updates to the replication table should include the RETURNING clause.

45

cost_model_version

The value 3 is added, which signifies an enhancement to the broadcast cost estimation for large cluster environments. This optimization builds upon the existing value 2, enabling the optimizer to more effectively select superior execution plans.

46

enable_track_record_subsql

The default value of this parameter is changed to on.

Deleted

47

enable_grant_public

This parameter specifies that the grant to public syntax is not supported in security mode and is deleted in versions later than 8.2.1.

48

enable_grant_option

This parameter specifies that the grant with grant option syntax is not supported in security mode and is deleted in versions later than 8.2.1.