diff --git a/content/en/docs/Developerguide/MOT-Sample-PGBench-benchmark.md b/content/en/docs/Developerguide/MOT-Sample-PGBench-benchmark.md deleted file mode 100644 index 619902faa4805a61c597a7a56ba79cb31984fd97..0000000000000000000000000000000000000000 --- a/content/en/docs/Developerguide/MOT-Sample-PGBench-benchmark.md +++ /dev/null @@ -1,11 +0,0 @@ -# MOT Sample PGBench benchmark - -**pgbench** is a simple program for running benchmark tests on PostgreSQL. It runs the same sequence of SQL commands over and over, possibly in multiple concurrent database sessions, and then calculates the average transaction rate (transactions per second or TPS). By default, pgbench tests a scenario that is loosely based on TPC-B, involving five SELECT, UPDATE, and INSERT commands per transaction. - -To support the optimistic concurrency control (OCC) of the openGauss MOT several minor changes were applied to the standard **pgbench**. The enhanced utility is released as part of the openGauss code under the contrib** folder. - -A pgbench benchmark (26/08/2020) showed that MOT engine outperforms the Disk-engine by factor of x2.4-2.8 times, both higher TPS and lower Latency. - -+ Hardware tested: 2-socket 72 cores x86 server (Intel Xeon Gold 6154 CPU @ 3GHz) - -+ Test Parameters: Transaction=TPCB; Scaling Factor = 100 ;Query Protocol=Prepared \ No newline at end of file diff --git a/content/en/docs/Developerguide/asynchronous-redo-logging.md b/content/en/docs/Developerguide/asynchronous-redo-logging.md deleted file mode 100644 index f09b5d0ce991d88d6fe9e9ef5e8b6ab2dd43cc98..0000000000000000000000000000000000000000 --- a/content/en/docs/Developerguide/asynchronous-redo-logging.md +++ /dev/null @@ -1,30 +0,0 @@ -# Asynchronous Redo Logging - -The **Asynchronous Redo Logging** option is the fastest logging method, However, it does not ensure no data loss, meaning that some data that is still in the buffer and was not yet written to disk may get lost upon a power failure or database crash. When a transaction is committed by a client application, the transaction redo entries are recorded in internal buffers and written to disk at preconfigured intervals. The client application does not wait for the data being written to disk. It continues to the next transaction. This is what makes asynchronous redo logging the fastest logging method. - -When a transaction is committed by a client application, the transaction redo entries are recorded in the WAL Redo Log, as follows – - -1. While a transaction is in progress, it is stored in the MOT's memory. -2. After a transaction finishes and the client application sends a Commit command, the transaction redo entries are written to internal buffers, but are not yet written to disk. Then changes to the MOT data memory take place and the client application is notified that the transaction is committed. -3. At a preconfigured interval, a redo log thread running in the background collects all the buffered redo log entries and writes them to disk. - -## **Technical Description** - -Upon transaction commit, the transaction buffer is moved \(pointer assignment – not a data copy\) to a centralized buffer and a new transaction buffer is allocated for the transaction. The transaction is released as soon as its buffer is moved to the centralized buffer and the transaction thread is not blocked. The actual write to the log uses the Postgres walwriter thread. When the walwriter timer elapses, it first calls the AsynchronousRedoLogHandler \(via registered callback\) to write its buffers and then continues with its logic and flushes the data to the XLOG. - -**Figure 1** Asynchronous Logging![](figures/asynchronous-logging.png) - -## **Summary** - -The Asynchronous Redo Logging option is the fastest logging option because it does not require the client application to wait for data being written to disk. In addition, it groups many transactions redo entries and writes them together, thus reducing the amount of disk I/Os that slow down the MOT engine. - -The downside of the Asynchronous Redo Logging option is that it does not ensure that data will not get lost upon a crash or failure. Data that was committed, but was not yet written to disk, is not durable on commit and thus cannot be recovered in case of a failure. The Asynchronous Redo Logging option is most relevant for applications that are willing to sacrifice data recovery \(consistency\) over performance. - -Logging Design Details - -The following describes the design details of each persistence-related component in the In-Memory Engine Module. - -**Figure 2** Three Logging Options![](figures/three-logging-options.png) - -The RedoLog component is used by both by backend threads that use the In-Memory Engine and by the WAL writer in order to persist their data. Checkpoints are performed using the Checkpoint Manager, which is triggered by the Postgres checkpointer. - diff --git a/content/en/docs/Developerguide/character-processing-functions-and-operators.md b/content/en/docs/Developerguide/character-processing-functions-and-operators.md index ea908fd0f50e3546a4ba88fbb94182498975e543..116ab0cf1f76904e591fbbac80f0cb28fb619428 100644 --- a/content/en/docs/Developerguide/character-processing-functions-and-operators.md +++ b/content/en/docs/Developerguide/character-processing-functions-and-operators.md @@ -1493,17 +1493,6 @@ String functions and operators provided by openGauss are for concatenating strin >![](public_sys-resources/icon-note.gif) **NOTE:** ->- For a string containing newline characters, for example, a string consisting of a newline character and a space, the value of **length** and **lengthb** in openGauss is 2. ->- In openGauss, _n_ in the CHAR\(n\) type indicates the number of characters. Therefore, for multiple-octet coded character sets, the length returned by the LENGTHB function may be longer than n. ->- OpenGauss supports four types of databases: A, B, C, and PG. If the database type is not specified, the database type is A by default. The lexical analyzer of A is different from the other three types. In A, a null character string is regarded as NULL. Therefore, when the database of type A is used, if the preceding character operation function has an empter string as a parameter, no output is displayed.For example: -> -> ``` -> postgres=# SELECT translate('12345','123',''); -> translate -> ----------- -> -> (1 row) -> ``` -> -> This is because the kernel will determine whether the input parameter contains NULL before calling the corresponding function for processing. If so, the corresponding function will not be called, so there will be no output.In PG type, strings are handled in the same way as PostgresQL, so you won't have this problem。 +>- For a string containing newline characters, for example, a string consisting of a newline character and a space, the value of **length** and **lengthb** in openGauss is 2. +>- In openGauss, _n_ in the CHAR\(n\) type indicates the number of characters. Therefore, for multiple-octet coded character sets, the length returned by the LENGTHB function may be longer than n. diff --git a/content/en/docs/Developerguide/comparison-disk-vs-mot.md b/content/en/docs/Developerguide/comparison-disk-vs-mot.md index 2233bf8cedf1891644e5ced018219cd02c6634c3..193f3c0adc8712791bb3c94509f5ea38baca1fab 100644 --- a/content/en/docs/Developerguide/comparison-disk-vs-mot.md +++ b/content/en/docs/Developerguide/comparison-disk-vs-mot.md @@ -5,101 +5,101 @@ The following table briefly compares the various features of the openGauss disk- **Table 1** Comparison – Disk-based vs. MOT - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +

Feature

-

openGauss

-

Disk Store

-

openGauss

-

MOT Engine

-

Intel x86 + Kunpeng ARM

-

Yes

-

Yes

-

SQL and Feature-set Coverage

-

100%

-

98%

-

Scale-up (Many-cores, NUMA)

-

Low Efficiency

-

High Efficiency

-

Throughput

-

High

-

Extremely High

-

Latency

-

Low

-

Extremely Low

-

Distributed (Cluster Mode)

-

Yes

-

Yes

-

Isolation Levels

-
  • RC+SI
  • RR
  • Serializable
-
  • RC
  • RR
  • RC+SI (in V2 release)
-

Concurrency Control

-

Pessimistic

-

Optimistic

-

Data Capacity (Data + Index)

-

Unlimited

-

Limited to DRAM

-

Native Compilation

-

No

-

Yes

-

Replication, Recovery

-

Yes

-

Yes

-

Replication Options

-

2 (sync, async)

-

3 (sync, async, group-commit)

-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Feature

+

openGauss

+

Disk Store

+

openGauss

+

MOT Engine

+

Intel x86 + Kunpeng ARM

+

Yes

+

Yes

+

SQL and Feature-set Coverage

+

100%

+

98%

+

Scale-up (Many-cores, NUMA)

+

Low Efficiency

+

High Efficiency

+

Throughput

+

High

+

Extremely High

+

Latency

+

Low

+

Extremely Low

+

Distributed (Cluster Mode)

+

Yes

+

Yes

+

Isolation Levels

+
  • RC+SI
  • RR
  • Serializable
+
  • RC
  • RR
  • RC+SI (in V2 release)
+

Concurrency Control

+

Pessimistic

+

Optimistic

+

Data Capacity (Data + Index)

+

Unlimited

+

Limited to DRAM

+

Native Compilation

+

No

+

Yes

+

Replication, Recovery

+

Yes

+

Yes

+

Replication Options

+

2 (sync, async)

+

3 (sync, async, group-commit)

+
**Legend –** @@ -108,9 +108,9 @@ The following table briefly compares the various features of the openGauss disk- - RC = Read Committed - SI = Snapshot Isolation -# Appendices +Appendices -## References +References \[1\] Y. Mao, E. Kohler, and R. T. Morris. Cache craftiness for fast multicore key-value storage. In Proc. 7th ACM European Conference on Computer Systems \(EuroSys\), Apr. 2012. @@ -144,256 +144,257 @@ pp. 237–246. \[13\] S. K. Cha, S. Hwang, K. Kim, and K. Kwon. Cache-conscious concurrency control of main-memory indexes on shared-memory multiprocessor systems. In P. M. G. Apers, P. Atzeni, S. Ceri, S. Paraboschi, K. Ramamohanarao, and R. T. Snodgrass, editors, VLDB 2001, Proceedings of 27th International Conference on Very Large Data Bases, September 11-14, 2001, Roma, Italy, pages 181–190. Morga Kaufmann, 2001. -## Glossary +Glossary -**Table 2** Glossary +Table 11 – Glossary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +

Acronym

-

Definition/Description

-

2PL

-

2-Phase Locking

-

ACID

-

Atomicity, Consistency, Isolation, Durability

-

AP

-

Analytical Processing

-

ARM

-

Advanced RISC Machine, a hardware architecture alternative to x86

-

CC

-

Concurrency Control

-

CPU

-

Central Processing Unit

-

DB

-

Database

-

DBA

-

Database Administrator

-

DBMS

-

Database Management System

-

DDL

-

Data Definition Language. Database Schema management language

-

DML

-

Data Modification Language

-

ETL

-

Extract, Transform, Load or Encounter Time Locking

-

FDW

-

Foreign Data Wrapper

-

GC

-

Garbage Collector

-

HA

-

High Availability

-

HTAP

-

Hybrid Transactional-Analytical Processing

-

IoT

-

Internet of Things

-

IM

-

In-Memory

-

IMDB

-

In-Memory Database

-

IR

-

Intermediate Representation of a source code, used in compilation and optimization

-

JIT

-

Just In Time

-

JSON

-

JavaScript Object Notation

-

KV

-

Key Value

-

LLVM

-

Low-Level Virtual Machine, refers to a compilation code or queries to IR

-

M2M

-

Machine-to-Machine

-

ML

-

Machine Learning

-

MM

-

Main Memory

-

MO

-

Memory Optimized

-

MOT

-

Memory Optimized Tables storage engine (SE), pronounced as /em/ /oh/ /tee/

-

MVCC

-

Multi-Version Concurrency Control

-

NUMA

-

Non-Uniform Memory Access

-

OCC

-

Optimistic Concurrency Control

-

OLTP

-

Online Transaction Processing

-

PG

-

PostgreSQL

-

RAW

-

Reads-After-Writes

-

RC

-

Return Code

-

RTO

-

Recovery Time Objective

-

SE

-

Storage Engine

-

SQL

-

Structured Query Language

-

TCO

-

Total Cost of Ownership

-

TP

-

Transactional Processing

-

TPC-C

-

An On-Line Transaction Processing Benchmark

-

Tpm-C

-

Transactions-per-minute-C. A performance metric for TPC-C benchmark that counts new-order transactions.

-

TVM

-

Tiny Virtual Machine

-

TSO

-

Time Sharing Option

-

UDT

-

User-Defined Type

-

WAL

-

Write Ahead Log

-

XLOG

-

A PostgreSQL implementation of transaction logging (WAL - described above)

-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Acronym

+

Definition/Description

+

2PL

+

2-Phase Locking

+

ACID

+

Atomicity, Consistency, Isolation, Durability

+

AP

+

Analytical Processing

+

ARM

+

Advanced RISC Machine, a hardware architecture alternative to x86

+

CC

+

Concurrency Control

+

CPU

+

Central Processing Unit

+

DB

+

Database

+

DBA

+

Database Administrator

+

DBMS

+

Database Management System

+

DDL

+

Data Definition Language. Database Schema management language

+

DML

+

Data Modification Language

+

ETL

+

Extract, Transform, Load or Encounter Time Locking

+

FDW

+

Foreign Data Wrapper

+

GC

+

Garbage Collector

+

HA

+

High Availability

+

HTAP

+

Hybrid Transactional-Analytical Processing

+

IoT

+

Internet of Things

+

IM

+

In-Memory

+

IMDB

+

In-Memory Database

+

IR

+

Intermediate Representation of a source code, used in compilation and optimization

+

JIT

+

Just In Time

+

JSON

+

JavaScript Object Notation

+

KV

+

Key Value

+

LLVM

+

Low-Level Virtual Machine, refers to a compilation code or queries to IR

+

M2M

+

Machine-to-Machine

+

ML

+

Machine Learning

+

MM

+

Main Memory

+

MO

+

Memory Optimized

+

MOT

+

Memory Optimized Tables storage engine (SE), pronounced as /em/ /oh/ /tee/

+

MVCC

+

Multi-Version Concurrency Control

+

NUMA

+

Non-Uniform Memory Access

+

OCC

+

Optimistic Concurrency Control

+

OLTP

+

Online Transaction Processing

+

PG

+

PostgreSQL

+

RAW

+

Reads-After-Writes

+

RC

+

Return Code

+

RTO

+

Recovery Time Objective

+

SE

+

Storage Engine

+

SQL

+

Structured Query Language

+

TCO

+

Total Cost of Ownership

+

TP

+

Transactional Processing

+

TPC-C

+

An On-Line Transaction Processing Benchmark

+

Tpm-C

+

Transactions-per-minute-C. A performance metric for TPC-C benchmark that counts new-order transactions.

+

TVM

+

Tiny Virtual Machine

+

TSO

+

Time Sharing Option

+

UDT

+

User-Defined Type

+

WAL

+

Write Ahead Log

+

XLOG

+

A PostgreSQL implementation of transaction logging (WAL - described above)

+
diff --git a/content/en/docs/Developerguide/comparison-operators.md b/content/en/docs/Developerguide/comparison-operators.md index 8bc07e2602b8f2f2aa3ab7276bd7e1352ccc0a17..bf2d8394e395ba02aacac2b49ce9e3684364ad77 100644 --- a/content/en/docs/Developerguide/comparison-operators.md +++ b/content/en/docs/Developerguide/comparison-operators.md @@ -1,6 +1,6 @@ # Comparison Operators -Comparison operators are available for most data types and return Boolean values. +Comparison operators are available for all data types and return Boolean values. All comparison operators are binary operators. Only data types that are the same or can be implicitly converted can be compared using comparison operators. diff --git a/content/en/docs/Developerguide/create-function.md b/content/en/docs/Developerguide/create-function.md index f6517af3b0d4b7516f2f0643652abc3de9486d96..8cb4a8dc18f4e856019742629341f9306ce6846c 100644 --- a/content/en/docs/Developerguide/create-function.md +++ b/content/en/docs/Developerguide/create-function.md @@ -91,7 +91,7 @@ Specifies the parameter mode of the function. - Value range: **IN**, **OUT**, **INOUT**, and **VARIADIC**. The default value is **IN**. The parameters of **OUT** and **INOUT** cannot be used in the function definition of **RETURNS TABLE**. + Value range: **IN**, **OUT**, **INOUT**, and **VARIADIC**. The default value is **IN**. Only the parameter of the **OUT** mode can be followed by **VARIADIC**. The parameters of **OUT** and **INOUT** cannot be used in the function definition of **RETURNS TABLE**. >![](public_sys-resources/icon-note.gif) **NOTE:** >**VARIADIC** specifies parameters of the array type. diff --git a/content/en/docs/Developerguide/create-synonym.md b/content/en/docs/Developerguide/create-synonym.md index 1097d06103043fc9334e92b618e7b8ab43602b44..ce49dd681fb7d615719b88cbf5bb702eabfad09a 100644 --- a/content/en/docs/Developerguide/create-synonym.md +++ b/content/en/docs/Developerguide/create-synonym.md @@ -11,6 +11,7 @@ - Database objects that can be accessed using synonyms include tables, views, functions, and stored procedures. - To use synonyms, you must have the required permissions on associated objects. - The following DML statements support synonyms: **SELECT**, **INSERT**, **UPDATE**, **DELETE**, **EXPLAIN**, and **CALL**. +- The **CREATE SYNONYM** statement of an associated function or stored procedure cannot be used in a stored procedure. You are advised to use synonyms existing in the **pg\_synonym** system catalog in the stored procedure. ## Syntax diff --git a/content/en/docs/Developerguide/data-type-conversion.md b/content/en/docs/Developerguide/data-type-conversion.md index 11ad2425e2a220ced667f0e9220f486da2e692e5..98b26e86c9ccf357c4e9ded8b59c107ea3cae282 100644 --- a/content/en/docs/Developerguide/data-type-conversion.md +++ b/content/en/docs/Developerguide/data-type-conversion.md @@ -150,22 +150,7 @@ openGauss lists common implicit data type conversions in [Table 1](#en-us_topic

-

- -

INT4

- -

BOOLEAN

- -

-

- - -

BOOLEAN

- -

INT4

- -

-

- - diff --git a/content/en/docs/Developerguide/default-permission-mechanism.md b/content/en/docs/Developerguide/default-permission-mechanism.md index f581e7c44233bf6b957187b4fdc33147f6bbb5ae..706ca114964ece0c51c1e1c4393359abf969d18d 100644 --- a/content/en/docs/Developerguide/default-permission-mechanism.md +++ b/content/en/docs/Developerguide/default-permission-mechanism.md @@ -6,7 +6,7 @@ To enable another user to use the object, grant required permissions to the user openGauss supports the following permissions: **SELECT**, **INSERT**, **UPDATE**, **DELETE**, **TRUNCATE**, **REFERENCES**, **CREATE**, **CONNECT**, **EXECUTE**, and **USAGE**. Permission types are associated with object types. For permission details, see [GRANT](grant.md). -To remove permissions, run **[REVOKE](revoke.md)**. Object owner permissions such as **ALTER**, **DROP**, **GRANT**, and **REVOKE** are implicit and cannot be granted or revoked. That is, you have the implicit permissions for an object if you are the owner of the object. Object owners can remove their own common permissions, for example, making tables read-only to themselves or others,Except system administrators. +To remove permissions, run **[REVOKE](revoke.md)**. Object owner permissions such as **ALTER**, **DROP**, **GRANT**, and **REVOKE** are implicit and cannot be granted or revoked. That is, you have the implicit permissions for an object if you are the owner of the object. Object owners can remove their own common permissions, for example, making tables read-only to themselves or others. System catalogs and views are visible to either system administrators or all users. System catalogs and views that require system administrator permissions can be queried only by system administrators. For details, see [System Catalogs and System Views](system-catalogs-and-system-views.md). diff --git a/content/en/docs/Developerguide/example-logic-replication-code.md b/content/en/docs/Developerguide/example-logic-replication-code.md new file mode 100644 index 0000000000000000000000000000000000000000..0f1710e62d72ec3f1239dcf17d42d0c05275009b --- /dev/null +++ b/content/en/docs/Developerguide/example-logic-replication-code.md @@ -0,0 +1,106 @@ +# Example: Logic Replication Code + +The following example demonstrates how to use the logical replication function through the JDBC interface. + +``` +//Logical replication function example: file name, LogicalReplicationDemo.java +//Prerequisite: Add the IP address of the JDBC user machine to the database whitelist. Add the following content to pg_hba.conf: +//Assume that the IP address of the JDBC user machine is 10.10.10.10. +//host all all 10.10.10.10/32 sha256 +//host replication all 10.10.10.10/32 sha256 + +import org.postgresql.PGProperty; +import org.postgresql.jdbc.PgConnection; +import org.postgresql.replication.LogSequenceNumber; +import org.postgresql.replication.PGReplicationStream; + +import java.nio.ByteBuffer; +import java.sql.DriverManager; +import java.util.Properties; +import java.util.concurrent.TimeUnit; + +public class LogicalReplicationDemo { + public static void main(String[] args) { + String driver = "org.postgresql.Driver"; + //Set the IP address and port number of the database. + String sourceURL = "jdbc:postgresql://$ip:$port/postgres"; + PgConnection conn = null; + //The default name of the logical replication slot is replication_slot. + //Test mode: Create a logical replication slot. + int TEST_MODE_CREATE_SLOT = 1; + //Test mode: Enable logical replication (The prerequisite is that the logical replication slot already exists). + int TEST_MODE_START_REPL = 2; + //Test mode: Delete a logical replication slot. + int TEST_MODE_DROP_SLOT = 3; + //Enable different test modes. + int testMode = TEST_MODE_START_REPL; + + try { + Class.forName(driver); + } catch (Exception e) { + e.printStackTrace(); + return; + } + + try { + Properties properties = new Properties(); + PGProperty.USER.set(properties, "user"); + PGProperty.PASSWORD.set(properties, "passwd"); + //For logical replication, the following three attributes are mandatory. + PGProperty.ASSUME_MIN_SERVER_VERSION.set(properties, "9.4"); + PGProperty.REPLICATION.set(properties, "database"); + PGProperty.PREFER_QUERY_MODE.set(properties, "simple"); + conn = (PgConnection) DriverManager.getConnection(sourceURL, properties); + System.out.println("connection success!"); + + if(testMode == TEST_MODE_CREATE_SLOT){ + conn.getReplicationAPI() + .createReplicationSlot() + .logical() + .withSlotName("replication_slot") + .withOutputPlugin("test_decoding") + .make(); + }else if(testMode == TEST_MODE_START_REPL) { + //Create a replication slot before enabling this mode. + LogSequenceNumber waitLSN = LogSequenceNumber.valueOf("6F/E3C53568"); + PGReplicationStream stream = conn + .getReplicationAPI() + .replicationStream() + .logical() + .withSlotName("replication_slot") + .withSlotOption("include-xids", false) + .withSlotOption("skip-empty-xacts", true) + .withStartPosition(waitLSN) + .start(); + while (true) { + ByteBuffer byteBuffer = stream.readPending(); + + if (byteBuffer == null) { + TimeUnit.MILLISECONDS.sleep(10L); + continue; + } + + int offset = byteBuffer.arrayOffset(); + byte[] source = byteBuffer.array(); + int length = source.length - offset; + System.out.println(new String(source, offset, length)); + + //If the LSN needs to be flushed, call the following APIs based on the service requirements: + //LogSequenceNumber lastRecv = stream.getLastReceiveLSN(); + //stream.setFlushedLSN(lastRecv); + //stream.forceUpdateStatus(); + + } + }else if(testMode == TEST_MODE_DROP_SLOT){ + conn.getReplicationAPI() + .dropReplicationSlot("replication_slot"); + } + } catch (Exception e) { + e.printStackTrace(); + return; + } + } +} + +``` + diff --git a/content/en/docs/Developerguide/exception-handling.md b/content/en/docs/Developerguide/exception-handling.md index df110680f7850a3252ca3c469d3f304ecca98cca..2c0676a10be0cd13522a5f0d4d387bfbf47395d2 100644 --- a/content/en/docs/Developerguide/exception-handling.md +++ b/content/en/docs/Developerguide/exception-handling.md @@ -1,59 +1,59 @@ -# Exception Handling +# Exception Handling -The persistence module handles exceptions by using the Postgres error reporting infrastructure \(ereport\). An error message is recorded in the system log for each error condition. In addition, the error is reported to the envelope using Postgres’s built-in error reporting infrastructure. +The persistence module handles exceptions by using the Postgres error reporting infrastructure \(ereport\). In any case of an error condition, an error message is recorded in the system log, and the error is reported to the envelope using Postgres built in error reporting infrastructure. -The following exceptions are reported by this module – +The following exceptions are reported by the module **Table 1** Exception Handling - - - @@ -175,15 +176,18 @@ The PG code \(described below\) is returned internally by MOT to the database en - - - @@ -191,7 +195,8 @@ The PG code \(described below\) is returned internally by MOT to the database en - @@ -199,7 +204,10 @@ The PG code \(described below\) is returned internally by MOT to the database en - @@ -208,7 +216,8 @@ The PG code \(described below\) is returned internally by MOT to the database en

Duplicate key value violates unique constraint \"%s\"".

Key %s already exists.

- @@ -322,88 +331,85 @@ The PG code \(described below\) is returned internally by MOT to the database en - + - - + - - + - - + - - + - - + - - + - - + - + - + - - + - - + diff --git a/content/en/docs/Developerguide/mot-introduction.md b/content/en/docs/Developerguide/mot-introduction.md index 5fc1df4e40a4f5df127b0d0cf8ad7f1111b6230b..c62f804273c552bb0df7e6dec3c3d39529b0a757 100644 --- a/content/en/docs/Developerguide/mot-introduction.md +++ b/content/en/docs/Developerguide/mot-introduction.md @@ -20,6 +20,3 @@ Memory-Optimized Tables are fully ACID compliant, as follows: - **Isolation –** Transactions cannot interfere with each other. MOT supports repeatable‑reads and read-committed isolation levels. In the next release, MOT will also support serializable isolation. See the [MOT Isolation Levels](mot-isolation-levels.md) section for more information. - **Durability –** The effects of successfully completed \(committed\) transactions must persist despite crashes and failures. MOT is fully integrated with the WAL-based logging of openGauss. Both synchronous and asynchronous logging options are supported. MOT also uniquely supports synchronous + group commit with NUMA-awareness optimization. See the [MOT Durability Concepts](mot-durability-concepts.md) section for more information. -The MOT Engine was published in the VLDB 2020 (an International Conference on ‘Very Large Data Bases” or VLDB): - -**Industrial-Strength OLTP Using Main Memory and Many Cores**, VLDB 2020 vol. 13 – [Paper](http://www.vldb.org/pvldb/vol13/p3099-avni.pdf), [Video on youtube](https://www.youtube.com/watch?v=xcAbww6x8wo), [Video on bilibili](https://www.bilibili.com/video/BV1MA411n7ef?p=97). \ No newline at end of file diff --git a/content/en/docs/Developerguide/mot-isolation-levels.md b/content/en/docs/Developerguide/mot-isolation-levels.md index cfdb0dd3974d5dd6f5fbdba5ebc0c2682771d948..482f58e6e0120dcd3a85765e5c6c3a11cc465666 100644 --- a/content/en/docs/Developerguide/mot-isolation-levels.md +++ b/content/en/docs/Developerguide/mot-isolation-levels.md @@ -5,107 +5,108 @@ Even though MOT is fully ACID-compliant \(as described in the section\), not all **Table 1** Isolation Levels -

Exception Condition

+ + - - - - - - - - - - - - - - - - - - -

Exception Condition

Exception Code

+

Exception Code

Scenario

+

Scenario

Resulting Outcome

+

Resulting Outcome

WAL write failure

+

WAL write failure

ERRCODE_FDW_ERROR

+

ERRCODE_FDW_ERROR

On any case the WAL write fails

+

On any case the wal write fails

Transaction terminates

+

Transaction terminates

File IO error: write, open and so on

+

File IO error: write, open, etc

ERRCODE_IO_ERROR

+

ERRCODE_IO_ERROR

Checkpoint – Called on any file access error

+

Checkpoint: Called on any file access error

FATAL – process exists

+

FATAL – process exists

Out of Memory

+

Out of Memory

ERRCODE_INSUFFICIENT_RESOURCES

+

ERRCODE_INSUFFICIENT_RESOURCES

Checkpoint – Local memory allocation failures

+

Checkpoint: Local memory allocation failures

FATAL – process exists

+

FATAL – process exists

Logic, DB errors

+

Logic, DB errors

ERRCODE_INTERNAL_ERROR

+

ERRCODE_INTERNAL_

+

ERROR

Checkpoint: algorithm fails or failure to retrieve table data or indexes.

+

Checkpoint: algorithm fails, or failure to retrieve table data or indexes.

FATAL – process exists

+

FATAL – process exists

- diff --git a/content/en/docs/Developerguide/fetch.md b/content/en/docs/Developerguide/fetch.md index 321440ba1f1c554aecf7e7b3612fd683e8227136..d48b513e8f32e2e17e009622ccb0dd385a37cf1c 100644 --- a/content/en/docs/Developerguide/fetch.md +++ b/content/en/docs/Developerguide/fetch.md @@ -77,7 +77,7 @@ NEXT Value range: a possibly-signed integer - If _count_ is positive, the _count_'th row of the query will be fetched. If _count_ is less than the current cursor position, rewind is required, which is currently not supported. - - If _count_ is negative, Just grab the abs(count) row from the end of the query result. + - If _count_ is negative or 0, backward scanning is required, which is currently not supported. - RELATIVE count @@ -103,7 +103,7 @@ NEXT - FORWARD count - Starting from the current associated position, grab the following or previous count lines. + Fetches the next or prior _count_ rows \(same as **RELATIVE** _count_\). - FORWARD ALL diff --git a/content/en/docs/Developerguide/figures/logical-replication.png b/content/en/docs/Developerguide/figures/logical-replication.png new file mode 100644 index 0000000000000000000000000000000000000000..3eb778cd95dc2eba667f144e891c02dfc3000f73 Binary files /dev/null and b/content/en/docs/Developerguide/figures/logical-replication.png differ diff --git a/content/en/docs/Developerguide/figures/private-(local)-memory-(for-each-transaction)-and-a-global-memory.png b/content/en/docs/Developerguide/figures/private-(local)-memory-(for-each-transaction)-and-a-global-memory-(for-all-the-transactions-of-all-t.png similarity index 100% rename from content/en/docs/Developerguide/figures/private-(local)-memory-(for-each-transaction)-and-a-global-memory.png rename to content/en/docs/Developerguide/figures/private-(local)-memory-(for-each-transaction)-and-a-global-memory-(for-all-the-transactions-of-all-t.png diff --git "a/content/en/docs/Developerguide/figures/\345\233\276\347\211\2071.jpg" "b/content/en/docs/Developerguide/figures/\345\233\276\347\211\2071.jpg" deleted file mode 100644 index 3f01c56200ce77c6e16b1c48464b7ca471fe776e..0000000000000000000000000000000000000000 Binary files "a/content/en/docs/Developerguide/figures/\345\233\276\347\211\2071.jpg" and /dev/null differ diff --git a/content/en/docs/Developerguide/foregin-data-wrapper.md b/content/en/docs/Developerguide/foregin-data-wrapper.md new file mode 100644 index 0000000000000000000000000000000000000000..36e3f6371342e319b1155803758311a50be8130e --- /dev/null +++ b/content/en/docs/Developerguide/foregin-data-wrapper.md @@ -0,0 +1,11 @@ +# Foregin Data Wrapper + +The foreign data wrapper \(FDW\) of the openGauss can implement cross-database operations between openGauss databases and remote databases. Currently, the following remote databases are supported: Oracle, MySQL \(MariaDB\), and openGauss \(postgres\_fdw\). + +- **[oracle\_fdw](oracle_fdw.md)** + +- **[mysql\_fdw](mysql_fdw.md)** + +- **[postgres\_fdw](postgres_fdw.md)** + + diff --git a/content/en/docs/Developerguide/group-synchronous-redo-logging.md b/content/en/docs/Developerguide/group-synchronous-redo-logging.md deleted file mode 100644 index 4a3d3462f4222b696f0538fad3cd3009515cdaa9..0000000000000000000000000000000000000000 --- a/content/en/docs/Developerguide/group-synchronous-redo-logging.md +++ /dev/null @@ -1,36 +0,0 @@ -# Group Synchronous Redo Logging - -The **Group Synchronous Redo Logging** option is very similar to the **Synchronous Redo Logging** option, because it also ensures total durability with absolutely no data loss and total synchronization of the client application and the WAL \(Redo Log\) entries. The difference is that the **Group Synchronous Redo Logging** option writes _groups of transaction _redo entries to the WAL Redo Log on the disk at the same time, instead of writing each and every transaction as it is committed. Using Group Synchronous Redo Logging reduces the amount of disk I/Os and thus improves performance, especially when running a heavy workload. - -The MOT engine performs synchronous Group Commit logging with Non-Uniform Memory Access \(NUMA\)-awareness optimization by automatically grouping transactions according to the NUMA socket of the core on which the transaction is running. - -You may refer to the [NUMA Awareness Allocation and Affinity](numa-awareness-allocation-and-affinity.md) section for more information about NUMA-aware memory access. - -When a transaction commits, a group of entries are recorded in the WAL Redo Log, as follows – - -1. While a transaction is in progress, it is stored in the memory. The MOT engine groups transactions in buckets according to the NUMA socket of the core on which the transaction is running. This means that all the transactions running on the same socket are grouped together and that multiple groups will be filling in parallel according to the core on which the transaction is running. - - Writing transactions to the WAL is more efficient in this manner because all the buffers from the same socket are written to disk together. - - >![](public_sys-resources/icon-note.gif) **NOTE:** - > - >- Each thread runs on a single core/CPU which belongs to a single socket and each thread only writes to the socket of the core on which it is running. - -2. After a transaction finishes and the client application sends a Commit command, the transaction redo log entries are serialized together with other transactions that belong to the same group. -3. After the configured criteria are fulfilled for a specific group of transactions \(quantity of committed transactions or timeout period as describes in the [REDO LOG \(MOT\)](mot-configuration-settings.md#section361563811235)section\), the transactions in this group are written to the WAL on the disk. This means that while these log entries are being written to the log, the client applications that issued the commit are waiting for a response. -4. As soon as all the transaction buffers in the NUMA-aware group have been written to the log, all the transactions in the group are performing the necessary changes to the memory store and the clients are notified that these transactions are complete. - -## **Technical Description** - -The four colors represent 4 NUMA nodes. Thus each NUMA node has its own memory log enabling a group commit of multiple connections. - -**Figure 1** Group Commit – with NUMA-awareness![](figures/group-commit-with-numa-awareness.png) - -## **Summary** - -The **Group Synchronous Redo Logging** option is a an extremely safe and strict logging option because it ensures total synchronization of the client application and the WAL Redo log entries; thus ensuring total durability and consistency with absolutely no data loss. This logging option prevents the situation where a client application might mark a transaction as successful, when it has not yet been persisted to disk. - -On one hand this option has fewer disk writes than the **Synchronous Redo Logging** option, which may mean that it is faster. The downside is that transactions are locked for longer, meaning that they are locked until after all the transactions in the same NUMA memory have been written to the WAL Redo Log on the disk. - -The benefits of using this option depend on the type of transactional workload. For example, this option benefits systems that have many transactions \(and less so for systems that have few transactions, because there are few disk writes anyway\). - diff --git a/content/en/docs/Developerguide/keywords.md b/content/en/docs/Developerguide/keywords.md index 97dc7a8bce289d3a3d8258511d46f302b5caafb9..26c0913c916b85c05dbc57f5552813a399ba7d7f 100644 --- a/content/en/docs/Developerguide/keywords.md +++ b/content/en/docs/Developerguide/keywords.md @@ -1,6545 +1,6298 @@ -# Keywords - -The SQL contains reserved and non-reserved words. Standards require that reserved keywords not be used as other identifiers. Non-reserved keywords have special meanings only in a specific environment and can be used as identifiers in other environments. - -The naming rules for identifiers are as follows: - -- An identifier name can only contain letters, underscores, digits \(0-9\), and dollar signs \($\). -- An identifier name must start with a letter \(a to z\) or an underscore \(\_\). - - >![](public_sys-resources/icon-note.gif) **NOTE:** - >- The naming rules are recommended but not mandatory. - >- In special cases, double quotation marks can be used to avoid special character errors. - - -**Table 1** SQL keywords - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Keyword

-

openGauss

-

SQL:1999

-

SQL-92

-

ABORT

-

Non-reserved

-

-

-

-

-

ABS

-

-

-

Non-reserved

-

-

-

ABSOLUTE

-

Non-reserved

-

Reserved

-

Reserved

-

ACCESS

-

Non-reserved

-

-

-

-

-

ACCOUNT

-

Non-reserved

-

-

-

-

-

ACTION

-

Non-reserved

-

Reserved

-

Reserved

-

ADA

-

-

-

Non-reserved

-

Non-reserved

-

ADD

-

Non-reserved

-

Reserved

-

Reserved

-

ADMIN

-

Non-reserved

-

Reserved

-

-

-

AFTER

-

Non-reserved

-

Reserved

-

-

-

AGGREGATE

-

Non-reserved

-

Reserved

-

-

-

ALIAS

-

-

-

Reserved

-

-

-

ALL

-

Reserved

-

Reserved

-

Reserved

-

ALLOCATE

-

-

-

Reserved

-

Reserved

-

ALSO

-

Non-reserved

-

-

-

-

-

ALTER

-

Non-reserved

-

Reserved

-

Reserved

-

ALWAYS

-

Non-reserved

-

-

-

-

-

ANALYSE

-

Reserved

-

-

-

-

-

ANALYZE

-

Reserved

-

-

-

-

-

AND

-

Reserved

-

Reserved

-

Reserved

-

ANY

-

Reserved

-

Reserved

-

Reserved

-

APP

-

Non-reserved

-

-

-

-

-

ARE

-

-

-

Reserved

-

Reserved

-

ARRAY

-

Reserved

-

Reserved

-

-

-

AS

-

Reserved

-

Reserved

-

Reserved

-

ASC

-

Reserved

-

Reserved

-

Reserved

-

ASENSITIVE

-

-

-

Non-reserved

-

-

-

ASSERTION

-

Non-reserved

-

Reserved

-

Reserved

-

ASSIGNMENT

-

Non-reserved

-

Non-reserved

-

-

-

ASYMMETRIC

-

Reserved

-

Non-reserved

-

-

-

AT

-

Non-reserved

-

Reserved

-

Reserved

-

ATOMIC

-

-

-

Non-reserved

-

-

-

ATTRIBUTE

-

Non-reserved

-

-

-

-

-

AUTHID

-

Reserved

-

-

-

-

-

AUTHORIZATION

-

Reserved (functions and types allowed)

-

Reserved

-

Reserved

-

AUTOEXTEND

-

Non-reserved

-

-

-

-

-

AUTOMAPPED

-

Non-reserved

-

-

-

-

-

AVG

-

-

-

Non-reserved

-

Reserved

-

BACKWARD

-

Non-reserved

-

-

-

-

-

BARRIER

-

Non-reserved

-

-

-

-

-

BEFORE

-

Non-reserved

-

Reserved

-

-

-

BEGIN

-

Non-reserved

-

Reserved

-

Reserved

-

BEGIN_NON_ANOYBLOCK

-

Non-reserved

-

-

-

-

-

BETWEEN

-

Non-reserved (excluding functions and types)

-

Non-reserved

-

Reserved

-

BIGINT

-

Non-reserved (excluding functions and types)

-

-

-

-

-

BINARY

-

Reserved (functions and types allowed)

-

Reserved

-

-

-

BINARY_DOUBLE

-

Non-reserved (excluding functions and types)

-

-

-

-

-

BINARY_INTEGER

-

Non-reserved (excluding functions and types)

-

-

-

-

-

BIT

-

Non-reserved (excluding functions and types)

-

Reserved

-

Reserved

-

BITVAR

-

-

-

Non-reserved

-

-

-

BIT_LENGTH

-

-

-

Non-reserved

-

Reserved

-

BLOB

-

Non-reserved

-

Reserved

-

-

-

BOOLEAN

-

Non-reserved (excluding functions and types)

-

Reserved

-

-

-

BOTH

-

Reserved

-

Reserved

-

Reserved

-

BUCKETS

-

Reserved

-

-

-

-

-

BREADTH

-

-

-

Reserved

-

-

-

BY

-

Non-reserved

-

Reserved

-

Reserved

-

C

-

-

-

Non-reserved

-

Non-reserved

-

CACHE

-

Non-reserved

-

-

-

-

-

CALL

-

Non-reserved

-

Reserved

-

-

-

CALLED

-

Non-reserved

-

Non-reserved

-

-

-

CARDINALITY

-

-

-

Non-reserved

-

-

-

CASCADE

-

Non-reserved

-

Reserved

-

Reserved

-

CASCADED

-

Non-reserved

-

Reserved

-

Reserved

-

CASE

-

Reserved

-

Reserved

-

Reserved

-

CAST

-

Reserved

-

Reserved

-

Reserved

-

CATALOG

-

Non-reserved

-

Reserved

-

Reserved

-

CATALOG_NAME

-

-

-

Non-reserved

-

Non-reserved

-

CHAIN

-

Non-reserved

-

Non-reserved

-

-

-

CHAR

-

Non-reserved (excluding functions and types)

-

Reserved

-

Reserved

-

CHARACTER

-

Non-reserved (excluding functions and types)

-

Reserved

-

Reserved

-

CHARACTERISTICS

-

Non-reserved

-

-

-

-

-

CHARACTER_LENGTH

-

-

-

Non-reserved

-

Reserved

-

CHARACTER_SET_CATALOG

-

-

-

Non-reserved

-

Non-reserved

-

CHARACTER_SET_NAME

-

-

-

Non-reserved

-

Non-reserved

-

CHARACTER_SET_SCHEMA

-

-

-

Non-reserved

-

Non-reserved

-

CHAR_LENGTH

-

-

-

Non-reserved

-

Reserved

-

CHECK

-

Reserved

-

Reserved

-

Reserved

-

CHECKED

-

-

-

Non-reserved

-

-

-

CHECKPOINT

-

Non-reserved

-

-

-

-

-

CLASS

-

Non-reserved

-

Reserved

-

-

-

CLEAN

-

Non-reserved

-

-

-

-

-

CLASS_ORIGIN

-

-

-

Non-reserved

-

Non-reserved

-

CLOB

-

Non-reserved

-

Reserved

-

-

-

CLOSE

-

Non-reserved

-

Reserved

-

Reserved

-

CLUSTER

-

Non-reserved

-

-

-

-

-

COALESCE

-

Non-reserved (excluding functions and types)

-

Non-reserved

-

Reserved

-

COBOL

-

-

-

Non-reserved

-

Non-reserved

-

COLLATE

-

Reserved

-

Reserved

-

Reserved

-

COLLATION

-

Reserved (functions and types allowed)

-

Reserved

-

Reserved

-

COLLATION_CATALOG

-

-

-

Non-reserved

-

Non-reserved

-

COLLATION_NAME

-

-

-

Non-reserved

-

Non-reserved

-

COLLATION_SCHEMA

-

-

-

Non-reserved

-

Non-reserved

-

COLUMN

-

Reserved

-

Reserved

-

Reserved

-

COLUMN_NAME

-

-

-

Non-reserved

-

Non-reserved

-

COMPACT

-

Reserved

-

-

-

-

-

COMPATIBLE_ILLEGAL_CHARS

-

Non-reserved

-

-

-

-

-

COMMAND_FUNCTION

-

-

-

Non-reserved

-

Non-reserved

-

COMPLETE

-

Non-reserved

-

-

-

-

-

COMMAND_FUNCTION_CODE

-

-

-

Non-reserved

-

-

-

COMMENT

-

Non-reserved

-

-

-

-

-

COMMENTS

-

Non-reserved

-

-

-

-

-

COMMIT

-

Non-reserved

-

Reserved

-

Reserved

-

COMMITTED

-

Non-reserved

-

Non-reserved

-

Non-reserved

-

COMPRESS

-

Non-reserved

-

-

-

-

-

COMPLETION

-

-

-

Reserved

-

-

-

CONCURRENTLY

-

Reserved (functions and types allowed)

-

-

-

-

-

CONDITION

-

-

-

-

-

-

-

CONDITION_NUMBER

-

-

-

Non-reserved

-

Non-reserved

-

CONFIGURATION

-

Non-reserved

-

-

-

-

-

CONNECT

-

-

-

Reserved

-

Reserved

-

CONNECTION

-

Non-reserved

-

Reserved

-

Reserved

-

CONNECTION_NAME

-

-

-

Non-reserved

-

Non-reserved

-

CONSTRAINT

-

Reserved

-

Reserved

-

Reserved

-

CONSTRAINTS

-

Non-reserved

-

Reserved

-

Reserved

-

CONSTRAINT_CATALOG

-

-

-

Non-reserved

-

Non-reserved

-

CONSTRAINT_NAME

-

-

-

Non-reserved

-

Non-reserved

-

CONSTRAINT_SCHEMA

-

-

-

Non-reserved

-

Non-reserved

-

CONSTRUCTOR

-

-

-

Reserved

-

-

-

CONTAINS

-

-

-

Non-reserved

-

-

-

CONTENT

-

Non-reserved

-

-

-

-

-

CONTINUE

-

Non-reserved

-

Reserved

-

Reserved

-

CONVERSION

-

Non-reserved

-

-

-

-

-

CONVERT

-

-

-

Non-reserved

-

Reserved

-

COORDINATOR

-

Non-reserved

-

-

-

-

-

COPY

-

Non-reserved

-

-

-

-

-

CORRESPONDING

-

-

-

Reserved

-

Reserved

-

COST

-

Non-reserved

-

-

-

-

-

COUNT

-

-

-

Non-reserved

-

Reserved

-

CREATE

-

Reserved

-

Reserved

-

Reserved

-

CROSS

-

Reserved (functions and types allowed)

-

Reserved

-

Reserved

-

CSV

-

Non-reserved

-

-

-

-

-

CUBE

-

Non-reserved

-

Reserved

-

-

-

CURRENT

-

Non-reserved

-

Reserved

-

Reserved

-

CURRENT_CATALOG

-

Reserved

-

-

-

-

-

CURRENT_DATE

-

Reserved

-

Reserved

-

Reserved

-

CURRENT_PATH

-

-

-

Reserved

-

-

-

CURRENT_ROLE

-

Reserved

-

Reserved

-

-

-

CURRENT_SCHEMA

-

Reserved (functions and types allowed)

-

-

-

-

-

CURRENT_TIME

-

Reserved

-

Reserved

-

Reserved

-

CURRENT_TIMESTAMP

-

Reserved

-

Reserved

-

Reserved

-

CURRENT_USER

-

Reserved

-

Reserved

-

Reserved

-

CURSOR

-

Non-reserved

-

Reserved

-

Reserved

-

CURSOR_NAME

-

-

-

Non-reserved

-

Non-reserved

-

CYCLE

-

Non-reserved

-

Reserved

-

-

-

DATA

-

Non-reserved

-

Reserved

-

Non-reserved

-

DATABASE

-

Non-reserved

-

-

-

-

-

DATAFILE

-

Non-reserved

-

-

-

-

-

DATE_FORMAT

-

Non-reserved

-

-

-

-

-

DATE

-

Non-reserved (excluding functions and types)

-

Reserved

-

Reserved

-

DELTAMERGE

-

Reserved

-

-

-

-

-

DATETIME_INTERVAL_CODE

-

-

-

Non-reserved

-

Non-reserved

-

DATETIME_INTERVAL_PRECISION

-

-

-

Non-reserved

-

Non-reserved

-

DAY

-

Non-reserved

-

Reserved

-

Reserved

-

DBCOMPATIBILITY

-

Non-reserved

-

-

-

-

-

DEALLOCATE

-

Non-reserved

-

Reserved

-

Reserved

-

DEC

-

Non-reserved (excluding functions and types)

-

Reserved

-

Reserved

-

DECIMAL

-

Non-reserved (excluding functions and types)

-

Reserved

-

Reserved

-

DECLARE

-

Non-reserved

-

Reserved

-

Reserved

-

DECODE

-

Non-reserved (excluding functions and types)

-

-

-

-

-

DEFAULT

-

Reserved

-

Reserved

-

Reserved

-

DEFAULTS

-

Non-reserved

-

-

-

-

-

DEFERRABLE

-

Reserved

-

Reserved

-

Reserved

-

DEFERRED

-

Non-reserved

-

Reserved

-

Reserved

-

DEFINED

-

-

-

Non-reserved

-

-

-

DEFINER

-

Non-reserved

-

Non-reserved

-

-

-

DELETE

-

Non-reserved

-

Reserved

-

Reserved

-

DELIMITER

-

Non-reserved

-

-

-

-

-

DELIMITERS

-

Non-reserved

-

-

-

-

-

DELTA

-

Non-reserved

-

-

-

-

-

DEPTH

-

-

-

Reserved

-

-

-

DEREF

-

-

-

Reserved

-

-

-

DESC

-

Reserved

-

Reserved

-

Reserved

-

DESCRIBE

-

-

-

Reserved

-

Reserved

-

DESCRIPTOR

-

-

-

Reserved

-

Reserved

-

DESTROY

-

-

-

Reserved

-

-

-

DESTRUCTOR

-

-

-

Reserved

-

-

-

DETERMINISTIC

-

Non-reserved

-

Reserved

-

-

-

DIAGNOSTICS

-

-

-

Reserved

-

Reserved

-

DICTIONARY

-

Non-reserved

-

Reserved

-

-

-

DIRECT

-

Non-reserved

-

-

-

-

-

DIRECTORY

-

Non-reserved

-

-

-

-

-

DISABLE

-

Non-reserved

-

-

-

-

-

DISCARD

-

Non-reserved

-

-

-

-

-

DISCONNECT

-

Non-reserved

-

Reserved

-

Reserved

-

DISPATCH

-

-

-

Non-reserved

-

-

-

DISTINCT

-

Reserved

-

Reserved

-

Reserved

-

DISTRIBUTE

-

Non-reserved

-

-

-

-

-

DISTRIBUTION

-

Non-reserved

-

-

-

-

-

DO

-

Reserved

-

-

-

-

-

DOCUMENT

-

Non-reserved

-

-

-

-

-

DOMAIN

-

Non-reserved

-

Reserved

-

Reserved

-

DOUBLE

-

Non-reserved

-

Reserved

-

Reserved

-

DROP

-

Non-reserved

-

Reserved

-

Reserved

-

DUPLICATE

-

Non-reserved

-

-

-

-

-

DYNAMIC

-

-

-

Reserved

-

-

-

DYNAMIC_FUNCTION

-

-

-

Non-reserved

-

Non-reserved

-

DYNAMIC_FUNCTION_CODE

-

-

-

Non-reserved

-

-

-

EACH

-

Non-reserved

-

Reserved

-

-

-

ELSE

-

Reserved

-

Reserved

-

Reserved

-

ELASTIC

-

Non-reserved

-

-

-

-

-

ENABLE

-

Non-reserved

-

-

-

-

-

ENCODING

-

Non-reserved

-

-

-

-

-

ENCRYPTED

-

Non-reserved

-

-

-

-

-

END

-

Reserved

-

Reserved

-

Reserved

-

END-EXEC

-

-

-

Reserved

-

Reserved

-

ENFORCED

-

Non-reserved

-

-

-

-

-

ENUM

-

Non-reserved

-

-

-

-

-

EOL

-

Non-reserved

-

-

-

-

-

ERRORS

-

Non-reserved

-

-

-

-

-

EQUALS

-

-

-

Reserved

-

-

-

ESCAPE

-

Non-reserved

-

Reserved

-

Reserved

-

ESCAPING

-

Non-reserved

-

-

-

-

-

EVERY

-

Non-reserved

-

Reserved

-

-

-

EXCEPT

-

Reserved

-

Reserved

-

Reserved

-

EXCEPTION

-

-

-

Reserved

-

Reserved

-

EXCHANGE

-

Non-reserved

-

-

-

-

-

EXCLUDE

-

Non-reserved

-

-

-

-

-

EXCLUDED

-

Reserved

-

-

-

-

-

EXCLUDING

-

Non-reserved

-

-

-

-

-

EXCLUSIVE

-

Non-reserved

-

-

-

-

-

EXEC

-

-

-

Reserved

-

Reserved

-

EXECUTE

-

Non-reserved

-

Reserved

-

Reserved

-

EXISTING

-

-

-

Non-reserved

-

-

-

EXISTS

-

Non-reserved (excluding functions and types)

-

Non-reserved

-

Reserved

-

EXPLAIN

-

Non-reserved

-

-

-

-

-

EXTENSION

-

Non-reserved

-

-

-

-

-

EXTERNAL

-

Non-reserved

-

Reserved

-

Reserved

-

EXTRACT

-

Non-reserved (excluding functions and types)

-

Non-reserved

-

Reserved

-

FALSE

-

Reserved

-

Reserved

-

Reserved

-

FAMILY

-

Non-reserved

-

-

-

-

-

FAST

-

Non-reserved

-

-

-

-

-

FETCH

-

Reserved

-

Reserved

-

Reserved

-

FENCED

-

Reserved

-

-

-

-

-

FILEHEADER

-

Non-reserved

-

-

-

-

-

FINAL

-

-

-

Non-reserved

-

-

-

FIRST

-

Non-reserved

-

Reserved

-

Reserved

-

FIXED

-

Non-reserved

-

Reserved

-

Reserved

-

FILL_MISSING_FIELDS

-

Non-reserved

-

-

-

-

-

FLOAT

-

Non-reserved (excluding functions and types)

-

Reserved

-

Reserved

-

FOLLOWING

-

Non-reserved

-

-

-

-

-

FOR

-

Reserved

-

Reserved

-

Reserved

-

FORCE

-

Non-reserved

-

-

-

-

-

FOREIGN

-

Reserved

-

Reserved

-

Reserved

-

FORMATTER

-

Non-reserved

-

-

-

-

-

FORTRAN

-

-

-

Non-reserved

-

Non-reserved

-

FORWARD

-

Non-reserved

-

-

-

-

-

FOUND

-

-

-

Reserved

-

Reserved

-

FREE

-

-

-

Reserved

-

-

-

FREEZE

-

Reserved (functions and types allowed)

-

-

-

-

-

FROM

-

Reserved

-

Reserved

-

Reserved

-

FULL

-

Reserved (functions and types allowed)

-

Reserved

-

Reserved

-

FUNCTION

-

Non-reserved

-

Reserved

-

-

-

FUNCTIONS

-

Non-reserved

-

-

-

-

-

G

-

-

-

Non-reserved

-

-

-

GENERAL

-

-

-

Reserved

-

-

-

GENERATED

-

-

-

Non-reserved

-

-

-

GET

-

-

-

Reserved

-

Reserved

-

GLOBAL

-

Non-reserved

-

Reserved

-

Reserved

-

GO

-

-

-

Reserved

-

Reserved

-

GOTO

-

-

-

Reserved

-

Reserved

-

GRANT

-

Reserved

-

Reserved

-

Reserved

-

GRANTED

-

Non-reserved

-

Non-reserved

-

-

-

GREATEST

-

Non-reserved (excluding functions and types)

-

-

-

-

-

GROUP

-

Reserved

-

Reserved

-

Reserved

-

GROUPING

-

-

-

Reserved

-

-

-

HANDLER

-

Non-reserved

-

-

-

-

-

HAVING

-

Reserved

-

Reserved

-

Reserved

-

HDFSDIRECTORY

-

Reserved

-

-

-

-

-

HEADER

-

Non-reserved

-

-

-

-

-

HIERARCHY

-

-

-

Non-reserved

-

-

-

HOLD

-

Non-reserved

-

Non-reserved

-

-

-

HOST

-

-

-

Reserved

-

-

-

HOUR

-

Non-reserved

-

Reserved

-

Reserved

-

IDENTIFIED

-

Non-reserved

-

-

-

-

-

IDENTITY

-

Non-reserved

-

Reserved

-

Reserved

-

IF

-

Non-reserved

-

-

-

-

-

IGNORE

-

-

-

Reserved

-

-

-

IGNORE_EXTRA_DATA

-

Non-reserved

-

-

-

-

-

ILIKE

-

Reserved (functions and types allowed)

-

-

-

-

-

IMMEDIATE

-

Non-reserved

-

Reserved

-

Reserved

-

IMMUTABLE

-

Non-reserved

-

-

-

-

-

IMPLEMENTATION

-

-

-

Non-reserved

-

-

-

IMPLICIT

-

Non-reserved

-

-

-

-

-

IN

-

Reserved

-

Reserved

-

Reserved

-

INTERNAL

-

Non-reserved

-

-

-

-

-

INCLUDING

-

Non-reserved

-

-

-

-

-

INCREMENT

-

Non-reserved

-

-

-

-

-

INDEX

-

Non-reserved

-

-

-

-

-

INDEXES

-

Non-reserved

-

-

-

-

-

INDICATOR

-

-

-

Reserved

-

Reserved

-

INFIX

-

-

-

Non-reserved

-

-

-

INHERIT

-

Non-reserved

-

-

-

-

-

INHERITS

-

Non-reserved

-

-

-

-

-

INITIAL

-

Non-reserved

-

-

-

-

-

INITIALIZE

-

-

-

Reserved

-

-

-

INITIALLY

-

Reserved

-

Reserved

-

Reserved

-

INITRANS

-

Non-reserved

-

-

-

-

-

INLINE

-

Non-reserved

-

-

-

-

-

INNER

-

Reserved (functions and types allowed)

-

Reserved

-

Reserved

-

INOUT

-

Non-reserved (excluding functions and types)

-

Reserved

-

-

-

INPUT

-

Non-reserved

-

Reserved

-

Reserved

-

INSENSITIVE

-

Non-reserved

-

Non-reserved

-

Reserved

-

INSERT

-

Non-reserved

-

Reserved

-

Reserved

-

INSTANCE

-

-

-

Non-reserved

-

-

-

INSTANTIABLE

-

-

-

Non-reserved

-

-

-

INSTEAD

-

Non-reserved

-

-

-

-

-

INT

-

Non-reserved (excluding functions and types)

-

Reserved

-

Reserved

-

INTEGER

-

Non-reserved (excluding functions and types)

-

Reserved

-

Reserved

-

INTERSECT

-

Reserved

-

Reserved

-

Reserved

-

INTERVAL

-

Non-reserved (excluding functions and types)

-

Reserved

-

Reserved

-

INTO

-

Reserved

-

Reserved

-

Reserved

-

INVOKER

-

Non-reserved

-

Non-reserved

-

-

-

IS

-

Reserved

-

Reserved

-

Reserved

-

ISNULL

-

Non-reserved

-

-

-

-

-

ISOLATION

-

Non-reserved

-

Reserved

-

Reserved

-

ITERATE

-

-

-

Reserved

-

-

-

JOIN

-

Reserved (functions and types allowed)

-

Reserved

-

Reserved

-

K

-

-

-

Non-reserved

-

-

-

KEY

-

Non-reserved

-

Reserved

-

Reserved

-

KEY_MEMBER

-

-

-

Non-reserved

-

-

-

KEY_TYPE

-

-

-

Non-reserved

-

-

-

KILL

-

Non-reserved

-

-

-

-

-

LABEL

-

Non-reserved

-

-

-

-

-

LANGUAGE

-

Non-reserved

-

Reserved

-

Reserved

-

LARGE

-

Non-reserved

-

Reserved

-

-

-

LAST

-

Non-reserved

-

Reserved

-

Reserved

-

LATERAL

-

-

-

Reserved

-

-

-

LC_COLLATE

-

Non-reserved

-

-

-

-

-

LC_CTYPE

-

Non-reserved

-

-

-

-

-

LEADING

-

Reserved

-

Reserved

-

Reserved

-

LEAKPROOF

-

Non-reserved

-

-

-

-

-

LEAST

-

Non-reserved (excluding functions and types)

-

-

-

-

-

LEFT

-

Reserved (functions and types allowed)

-

Reserved

-

Reserved

-

LENGTH

-

-

-

Non-reserved

-

Non-reserved

-

LESS

-

Reserved

-

Reserved

-

-

-

LEVEL

-

Non-reserved

-

Reserved

-

Reserved

-

LIKE

-

Reserved (functions and types allowed)

-

Reserved

-

Reserved

-

LIMIT

-

Reserved

-

Reserved

-

-

-

LISTEN

-

Non-reserved

-

-

-

-

-

LOAD

-

Non-reserved

-

-

-

-

-

LOCAL

-

Non-reserved

-

Reserved

-

Reserved

-

LOCALTIME

-

Reserved

-

Reserved

-

-

-

LOCALTIMESTAMP

-

Reserved

-

Reserved

-

-

-

LOCATION

-

Non-reserved

-

-

-

-

-

LOCATOR

-

-

-

Reserved

-

-

-

LOCK

-

Non-reserved

-

-

-

-

-

LOG

-

Non-reserved

-

-

-

-

-

LOGGING

-

Non-reserved

-

-

-

-

-

LOGIN

-

Non-reserved

-

-

-

-

-

LOOP

-

Non-reserved

-

-

-

-

-

LOWER

-

-

-

Non-reserved

-

Reserved

-

MAP

-

-

-

Reserved

-

-

-

MAPPING

-

Non-reserved

-

-

-

-

-

MATCH

-

Non-reserved

-

Reserved

-

Reserved

-

MATCHED

-

Non-reserved

-

-

-

-

-

MAX

-

-

-

Non-reserved

-

Reserved

-

MAXEXTENTS

-

Non-reserved

-

-

-

-

-

MAXSIZE

-

Non-reserved

-

-

-

-

-

MAXTRANS

-

Non-reserved

-

-

-

-

-

MAXVALUE

-

Reserved

-

-

-

-

-

MERGE

-

Non-reserved

-

-

-

-

-

MESSAGE_LENGTH

-

-

-

Non-reserved

-

Non-reserved

-

MESSAGE_OCTET_LENGTH

-

-

-

Non-reserved

-

Non-reserved

-

MESSAGE_TEXT

-

-

-

Non-reserved

-

Non-reserved

-

METHOD

-

-

-

Non-reserved

-

-

-

MIN

-

-

-

Non-reserved

-

Reserved

-

MINEXTENTS

-

Non-reserved

-

-

-

-

-

MINUS

-

Reserved

-

-

-

-

-

MINUTE

-

Non-reserved

-

Reserved

-

Reserved

-

MINVALUE

-

Non-reserved

-

-

-

-

-

MOD

-

-

-

Non-reserved

-

-

-

MODE

-

Non-reserved

-

-

-

-

-

MODIFIES

-

-

-

Reserved

-

-

-

MODIFY

-

Reserved

-

Reserved

-

-

-

MODULE

-

-

-

Reserved

-

Reserved

-

MONTH

-

Non-reserved

-

Reserved

-

Reserved

-

MORE

-

-

-

Non-reserved

-

Non-reserved

-

MOVE

-

Non-reserved

-

-

-

-

-

MOVEMENT

-

Non-reserved

-

-

-

-

-

MUMPS

-

-

-

Non-reserved

-

Non-reserved

-

NAME

-

Non-reserved

-

Non-reserved

-

Non-reserved

-

NAMES

-

Non-reserved

-

Reserved

-

Reserved

-

NATIONAL

-

Non-reserved (excluding functions and types)

-

Reserved

-

Reserved

-

NATURAL

-

Reserved (functions and types allowed)

-

Reserved

-

Reserved

-

NCHAR

-

Non-reserved (excluding functions and types)

-

Reserved

-

Reserved

-

NCLOB

-

-

-

Reserved

-

-

-

NEW

-

-

-

Reserved

-

-

-

NEXT

-

Non-reserved

-

Reserved

-

Reserved

-

NLSSORT

-

Reserved

-

-

-

-

-

NO

-

Non-reserved

-

Reserved

-

Reserved

-

NOCOMPRESS

-

Non-reserved

-

-

-

-

-

NOCYCLE

-

Non-reserved

-

-

-

-

-

NODE

-

Non-reserved

-

-

-

-

-

NOLOGGING

-

Non-reserved

-

-

-

-

-

NOLOGIN

-

Non-reserved

-

-

-

-

-

NOMAXVALUE

-

Non-reserved

-

-

-

-

-

NOMINVALUE

-

Non-reserved

-

-

-

-

-

NONE

-

Non-reserved (excluding functions and types)

-

Reserved

-

-

-

NOT

-

Reserved

-

Reserved

-

Reserved

-

NOTHING

-

Non-reserved

-

-

-

-

-

NOTIFY

-

Non-reserved

-

-

-

-

-

NOTNULL

-

Reserved (functions and types allowed)

-

-

-

-

-

NOWAIT

-

Non-reserved

-

-

-

-

-

NULL

-

Reserved

-

Reserved

-

Reserved

-

NULLABLE

-

-

-

Non-reserved

-

Non-reserved

-

NULLIF

-

Non-reserved (excluding functions and types)

-

Non-reserved

-

Reserved

-

NULLS

-

Non-reserved

-

-

-

-

-

NUMBER

-

Non-reserved (excluding functions and types)

-

Non-reserved

-

Non-reserved

-

NUMERIC

-

Non-reserved (excluding functions and types)

-

Reserved

-

Reserved

-

NUMSTR

-

Non-reserved

-

-

-

-

-

NVARCHAR2

-

Non-reserved (excluding functions and types)

-

-

-

-

-

NVL

-

Non-reserved (excluding functions and types)

-

-

-

-

-

OBJECT

-

Non-reserved

-

Reserved

-

-

-

OCTET_LENGTH

-

-

-

Non-reserved

-

Reserved

-

OF

-

Non-reserved

-

Reserved

-

Reserved

-

OFF

-

Non-reserved

-

Reserved

-

-

-

OFFSET

-

Reserved

-

-

-

-

-

OIDS

-

Non-reserved

-

-

-

-

-

OLD

-

-

-

Reserved

-

-

-

ON

-

Reserved

-

Reserved

-

Reserved

-

ONLY

-

Reserved

-

Reserved

-

Reserved

-

OPEN

-

-

-

Reserved

-

Reserved

-

OPERATION

-

-

-

Reserved

-

-

-

OPERATOR

-

Non-reserved

-

-

-

-

-

OPTIMIZATION

-

Non-reserved

-

-

-

-

-

OPTION

-

Non-reserved

-

Reserved

-

Reserved

-

OPTIONS

-

Non-reserved

-

Non-reserved

-

-

-

OR

-

Reserved

-

Reserved

-

Reserved

-

ORDER

-

Reserved

-

Reserved

-

Reserved

-

ORDINALITY

-

-

-

Reserved

-

-

-

OUT

-

Non-reserved (excluding functions and types)

-

Reserved

-

-

-

OUTER

-

Reserved (functions and types allowed)

-

Reserved

-

Reserved

-

OUTPUT

-

-

-

Reserved

-

Reserved

-

OVER

-

Non-reserved

-

-

-

-

-

OVERLAPS

-

Reserved (functions and types allowed)

-

Non-reserved

-

Reserved

-

OVERLAY

-

Non-reserved (excluding functions and types)

-

Non-reserved

-

-

-

OVERRIDING

-

-

-

Non-reserved

-

-

-

OWNED

-

Non-reserved

-

-

-

-

-

OWNER

-

Non-reserved

-

-

-

-

-

PACKAGE

-

Non-reserved

-

-

-

-

-

PAD

-

-

-

Reserved

-

Reserved

-

PARAMETER

-

-

-

Reserved

-

-

-

PARAMETERS

-

-

-

Reserved

-

-

-

PARAMETER_MODE

-

-

-

Non-reserved

-

-

-

PARAMETER_NAME

-

-

-

Non-reserved

-

-

-

PARAMETER_ORDINAL_POSITION

-

-

-

Non-reserved

-

-

-

PARAMETER_SPECIFIC_CATALOG

-

-

-

Non-reserved

-

-

-

PARAMETER_SPECIFIC_NAME

-

-

-

Non-reserved

-

-

-

PARAMETER_SPECIFIC_SCHEMA

-

-

-

Non-reserved

-

-

-

PARSER

-

Non-reserved

-

-

-

-

-

PARTIAL

-

Non-reserved

-

Reserved

-

Reserved

-

PARTITION

-

Non-reserved

-

-

-

-

-

PARTITIONS

-

Non-reserved

-

-

-

-

-

PASCAL

-

-

-

Non-reserved

-

Non-reserved

-

PASSING

-

Non-reserved

-

-

-

-

-

PASSWORD

-

Non-reserved

-

-

-

-

-

PATH

-

-

-

Reserved

-

-

-

PCTFREE

-

Non-reserved

-

-

-

-

-

PER

-

Non-reserved

-

-

-

-

-

PERM

-

Non-reserved

-

-

-

-

-

PERCENT

-

Non-reserved

-

-

-

-

-

PERFORMANCE

-

Reserved

-

-

-

-

-

PLACING

-

Reserved

-

-

-

-

-

PLAN

-

Non-reserved

-
    

PLANS

-

Non-reserved

-

-

-

-

-

PLI

-

-

-

Non-reserved

-

Non-reserved

-

POOL

-

Non-reserved

-

-

-

-

-

POLICY

-

Non-reserved

-

-

-

-

-

POSITION

-

Non-reserved (excluding functions and types)

-

Non-reserved

-

Reserved

-

POSTFIX

-

-

-

Reserved

-

-

-

PRECEDING

-

Non-reserved

-

-

-

-

-

PRECISION

-

Non-reserved (excluding functions and types)

-

Reserved

-

Reserved

-

PREFERRED

-

Non-reserved

-

-

-

-

-

PREFIX

-

Non-reserved

-

Reserved

-

-

-

PREORDER

-

-

-

Reserved

-

-

-

PREPARE

-

Non-reserved

-

Reserved

-

Reserved

-

PREPARED

-

Non-reserved

-

-

-

-

-

PRESERVE

-

Non-reserved

-

Reserved

-

Reserved

-

PRIMARY

-

Reserved

-

Reserved

-

Reserved

-

PRIOR

-

Non-reserved

-

Reserved

-

Reserved

-

PRIVATE

-

Non-reserved

-

-

-

-

-

PRIVILEGE

-

Non-reserved

-

-

-

-

-

PRIVILEGES

-

Non-reserved

-

Reserved

-

Reserved

-

PROCEDURAL

-

Non-reserved

-

-

-

-

-

PROCEDURE

-

Reserved

-

Reserved

-

Reserved

-

PROFILE

-

Non-reserved

-

-

-

-

-

PUBLIC

-

-

-

Reserved

-

Reserved

-

QUERY

-

Non-reserved

-

-

-

-

-

QUOTE

-

Non-reserved

-

-

-

-

-

RANGE

-

Non-reserved

-

-

-

-

-

RAW

-

Non-reserved

-

-

-

-

-

READ

-

Non-reserved

-

Reserved

-

Reserved

-

READS

-

-

-

Reserved

-

-

-

REAL

-

Non-reserved (excluding functions and types)

-

Reserved

-

Reserved

-

REASSIGN

-

Non-reserved

-

-

-

-

-

REBUILD

-

Non-reserved

-

-

-

-

-

RECHECK

-

Non-reserved

-

-

-

-

-

RECURSIVE

-

Non-reserved

-

Reserved

-

-

-

REF

-

Non-reserved

-

Reserved

-

-

-

REFERENCES

-

Reserved

-

Reserved

-

Reserved

-

REFERENCING

-

-

-

Reserved

-

-

-

REINDEX

-

Non-reserved

-

-

-

-

-

REJECT

-

Reserved

-

-

-

-

-

RELATIVE

-

Non-reserved

-

Reserved

-

Reserved

-

RELEASE

-

Non-reserved

-

-

-

-

-

RELOPTIONS

-

Non-reserved

-

-

-

-

-

REMOTE

-

Non-reserved

-

-

-

-

-

RENAME

-

Non-reserved

-

-

-

-

-

REPEATABLE

-

Non-reserved

-

Non-reserved

-

Non-reserved

-

REPLACE

-

Non-reserved

-

-

-

-

-

REPLICA

-

Non-reserved

-

-

-

-

-

RESET

-

Non-reserved

-

-

-

-

-

RESIZE

-

Non-reserved

-

-

-

-

-

RESOURCE

-

Non-reserved

-

-

-

-

-

RESTART

-

Non-reserved

-

-

-

-

-

RESTRICT

-

Non-reserved

-

Reserved

-

Reserved

-

RESULT

-

-

-

Reserved

-

-

-

RETURN

-

Non-reserved

-

Reserved

-

-

-

RETURNED_LENGTH

-

-

-

Non-reserved

-

Non-reserved

-

RETURNED_OCTET_LENGTH

-

-

-

Non-reserved

-

Non-reserved

-

RETURNED_SQLSTATE

-

-

-

Non-reserved

-

Non-reserved

-

RETURNING

-

Reserved

-

-

-

-

-

RETURNS

-

Non-reserved

-

Reserved

-

-

-

REUSE

-

Non-reserved

-

-

-

-

-

REVOKE

-

Non-reserved

-

Reserved

-

Reserved

-

RIGHT

-

Reserved (functions and types allowed)

-

Reserved

-

Reserved

-

ROLE

-

Non-reserved

-

Reserved

-

-

-

ROLLBACK

-

Non-reserved

-

Reserved

-

Reserved

-

ROLLUP

-

Non-reserved

-

Reserved

-

-

-

ROUTINE

-

-

-

Reserved

-

-

-

ROUTINE_CATALOG

-

-

-

Non-reserved

-

-

-

ROUTINE_NAME

-

-

-

Non-reserved

-

-

-

ROUTINE_SCHEMA

-

-

-

Non-reserved

-

-

-

ROW

-

Non-reserved (excluding functions and types)

-

Reserved

-

-

-

ROWS

-

Non-reserved

-

Reserved

-

Reserved

-

ROW_COUNT

-

-

-

Non-reserved

-

Non-reserved

-

RULE

-

Non-reserved

-

-

-

-

-

ROWNUM

-

Reserved

-

Reserved

-

-

-

SAVEPOINT

-

Non-reserved

-

Reserved

-

-

-

SCALE

-

-

-

Non-reserved

-

Non-reserved

-

SCHEMA

-

Non-reserved

-

Reserved

-

Reserved

-

SCHEMA_NAME

-

-

-

Non-reserved

-

Non-reserved

-

SCOPE

-

-

-

Reserved

-

-

-

SCROLL

-

Non-reserved

-

Reserved

-

Reserved

-

SEARCH

-

Non-reserved

-

Reserved

-

-

-

SECOND

-

Non-reserved

-

Reserved

-

Reserved

-

SECTION

-

-

-

Reserved

-

Reserved

-

SECURITY

-

Non-reserved

-

Non-reserved

-

-

-

SELECT

-

Reserved

-

Reserved

-

Reserved

-

SELF

-

-

-

Non-reserved

-

-

-

SENSITIVE

-

-

-

Non-reserved

-

-

-

SEQUENCE

-

Non-reserved

-

Reserved

-

-

-

SEQUENCES

-

Non-reserved

-

-

-

-

-

SERIALIZABLE

-

Non-reserved

-

Non-reserved

-

Non-reserved

-

SERVER

-

Non-reserved

-

-

-

-

-

SERVER_NAME

-

-

-

Non-reserved

-

Non-reserved

-

SESSION

-

Non-reserved

-

Reserved

-

Reserved

-

SESSION_USER

-

Reserved

-

Reserved

-

Reserved

-

SET

-

Non-reserved

-

Reserved

-

Reserved

-

SETOF

-

Non-reserved (excluding functions and types)

-

-

-

-

-

SETS

-

-

-

Reserved

-

-

-

SHARE

-

Non-reserved

-

-

-

-

-

SHIPPABLE

-

Non-reserved

-

-

-

-

-

SHOW

-

Non-reserved

-

-

-

-

-

SHUTDOWN

-

Non-reserved

-

-

-

-

-

SIMILAR

-

Reserved (functions and types allowed)

-

Non-reserved

-

-

-

SIMPLE

-

Non-reserved

-

Non-reserved

-

-

-

SIZE

-

Non-reserved

-

Reserved

-

Reserved

-

SMALLDATETIME_FORMAT

-

Non-reserved

-

-

-

-

-

SMALLDATETIME

-

Non-reserved (excluding functions and types)

-

-

-

-

-

SMALLINT

-

Non-reserved (excluding functions and types)

-

Reserved

-

Reserved

-

SNAPSHOT

-

Non-reserved

-

-

-

-

-

SOME

-

Reserved

-

Reserved

-

Reserved

-

SOURCE

-

Non-reserved

-

Non-reserved

-

-

-

SPACE

-

Non-reserved

-

Reserved

-

Reserved

-

SPECIFIC

-

-

-

Reserved

-

-

-

SPECIFICTYPE

-

-

-

Reserved

-

-

-

SPECIFIC_NAME

-

-

-

Non-reserved

-

-

-

SPILL

-

Non-reserved

-

-

-

-

-

SPLIT

-

Non-reserved

-

-

-

-

-

SQL

-

-

-

Reserved

-

Reserved

-

SQLCODE

-

-

-

-

-

Reserved

-

SQLERROR

-

-

-

-

-

Reserved

-

SQLEXCEPTION

-

-

-

Reserved

-

-

-

SQLSTATE

-

-

-

Reserved

-

Reserved

-

SQLWARNING

-

-

-

Reserved

-

-

-

STABLE

-

Non-reserved

-

-

-

-

-

STANDALONE

-

Non-reserved

-

-

-

-

-

START

-

Non-reserved

-

Reserved

-

-

-

STATE

-

-

-

Reserved

-

-

-

STATEMENT

-

Non-reserved

-

Reserved

-

-

-

STATEMENT_ID

-

Non-reserved

-

-

-

-

-

STATIC

-

-

-

Reserved

-

-

-

STATISTICS

-

Non-reserved

-

-

-

-

-

STDIN

-

Non-reserved

-

-

-

-

-

STDOUT

-

Non-reserved

-

-

-

-

-

STORAGE

-

Non-reserved

-

-

-

-

-

STORE

-

Non-reserved

-

-

-

-

-

STRICT

-

Non-reserved

-

-

-

-

-

STRIP

-

Non-reserved

-

-

-

-

-

STRUCTURE

-

-

-

Reserved

-

-

-

STYLE

-

-

-

Non-reserved

-

-

-

SUBCLASS_ORIGIN

-

-

-

Non-reserved

-

Non-reserved

-

SUBLIST

-

-

-

Non-reserved

-

-

-

SUBSTRING

-

Non-reserved (excluding functions and types)

-

Non-reserved

-

Reserved

-

SUM

-

-

-

Non-reserved

-

Reserved

-

SUPERUSER

-

Non-reserved

-

-

-

-

-

SYMMETRIC

-

Reserved

-

Non-reserved

-

-

-

SYNONYM

-

Non-reserved

-

-

-

-

-

SYS_REFCURSOR

-

Non-reserved

-

-

-

-

-

SYSDATE

-

Reserved

-

-

-

-

-

SYSID

-

Non-reserved

-

-

-

-

-

SYSTEM

-

Non-reserved

-

Non-reserved

-

-

-

SYSTEM_USER

-

-

-

Reserved

-

Reserved

-

TABLE

-

Reserved

-

Reserved

-

Reserved

-

TABLES

-

Non-reserved

-

-

-

-

-

TABLE_NAME

-

-

-

Non-reserved

-

Non-reserved

-

TIME_FORMAT

-

Non-reserved

-

-

-

-

-

TIMESTAMP_FORMAT

-

Non-reserved

-

-

-

-

-

TEMP

-

Non-reserved

-

-

-

-

-

TEMPLATE

-

Non-reserved

-

-

-

-

-

TEMPORARY

-

Non-reserved

-

Reserved

-

Reserved

-

TERMINATE

-

-

-

Reserved

-

-

-

TEXT

-

Non-reserved

-

-

-

-

-

THAN

-

Non-reserved

-

Reserved

-

-

-

THEN

-

Reserved

-

Reserved

-

Reserved

-

TIME

-

Non-reserved (excluding functions and types)

-

Reserved

-

Reserved

-

TIMESTAMP

-

Non-reserved (excluding functions and types)

-

Reserved

-

Reserved

-

TIMESTAMPDIFF

-

Non-reserved (excluding functions and types)

-

-

-

-

-

TIMEZONE_HOUR

-

-

-

Reserved

-

Reserved

-

TIMEZONE_MINUTE

-

-

-

Reserved

-

Reserved

-

TINYINT

-

Non-reserved (excluding functions and types)

-

-

-

-

-

TO

-

Reserved

-

Reserved

-

Reserved

-

TRAILING

-

Reserved

-

Reserved

-

Reserved

-

TRANSACTION

-

Non-reserved

-

Reserved

-

Reserved

-

TRANSACTIONS_COMMITTED

-

-

-

Non-reserved

-

-

-

TRANSACTIONS_ROLLED_BACK

-

-

-

Non-reserved

-

-

-

TRANSACTION_ACTIVE

-

-

-

Non-reserved

-

-

-

TRANSFORM

-

-

-

Non-reserved

-

-

-

TRANSFORMS

-

-

-

Non-reserved

-

-

-

TRANSLATE

-

-

-

Non-reserved

-

Reserved

-

TRANSLATION

-

-

-

Reserved

-

Reserved

-

TREAT

-

Non-reserved (excluding functions and types)

-

Reserved

-

-

-

TRIGGER

-

Non-reserved

-

Reserved

-

-

-

TRIGGER_CATALOG

-

-

-

Non-reserved

-

-

-

TRIGGER_NAME

-

-

-

Non-reserved

-

-

-

TRIGGER_SCHEMA

-

-

-

Non-reserved

-

-

-

TRIM

-

Non-reserved (excluding functions and types)

-

Non-reserved

-

Reserved

-

TRUE

-

Reserved

-

Reserved

-

Reserved

-

TRUNCATE

-

Non-reserved

-

-

-

-

-

TRUSTED

-

Non-reserved

-

-

-

-

-

TSFIELD

-

Non-reserved

-

-

-

-

-

TSTAG

-

Non-reserved

-

-

-

-

-

TSTIME

-

Non-reserved

-

-

-

-

-

TYPE

-

Non-reserved

-

Non-reserved

-

Non-reserved

-

TYPES

-

Non-reserved

-

-

-

-

-

UESCAPE

-

-

-

-

-

-

-

UNBOUNDED

-

Non-reserved

-

-

-

-

-

UNCOMMITTED

-

Non-reserved

-

Non-reserved

-

Non-reserved

-

UNDER

-

-

-

Reserved

-

-

-

UNENCRYPTED

-

Non-reserved

-

-

-

-

-

UNION

-

Reserved

-

Reserved

-

Reserved

-

UNIQUE

-

Reserved

-

Reserved

-

Reserved

-

UNKNOWN

-

Non-reserved

-

Reserved

-

Reserved

-

UNLIMITED

-

Non-reserved

-

-

-

-

-

UNLISTEN

-

Non-reserved

-

-

-

-

-

UNLOCK

-

Non-reserved

-

-

-

-

-

UNLOGGED

-

Non-reserved

-

-

-

-

-

UNNAMED

-

-

-

Non-reserved

-

Non-reserved

-

UNNEST

-

-

-

Reserved

-

-

-

UNTIL

-

Non-reserved

-

-

-

-

-

UNUSABLE

-

Non-reserved

-

-

-

-

-

UPDATE

-

Non-reserved

-

Reserved

-

Reserved

-

UPPER

-

-

-

Non-reserved

-

Reserved

-

USAGE

-

-

-

Reserved

-

Reserved

-

USER

-

Reserved

-

Reserved

-

Reserved

-

USER_DEFINED_TYPE_CATALOG

-

-

-

Non-reserved

-

-

-

USER_DEFINED_TYPE_NAME

-

-

-

Non-reserved

-

-

-

USER_DEFINED_TYPE_SCHEMA

-

-

-

Non-reserved

-

-

-

USING

-

Reserved

-

Reserved

-

Reserved

-

VACUUM

-

Non-reserved

-

-

-

-

-

VALID

-

Non-reserved

-

-

-

-

-

VALIDATE

-

Non-reserved

-

-

-

-

-

VALIDATION

-

Non-reserved

-

-

-

-

-

VALIDATOR

-

Non-reserved

-

-

-

-

-

VALUE

-

Non-reserved

-

Reserved

-

Reserved

-

VALUES

-

Non-reserved (excluding functions and types)

-

Reserved

-

Reserved

-

VARCHAR

-

Non-reserved (excluding functions and types)

-

Reserved

-

Reserved

-

VARCHAR2

-

Non-reserved (excluding functions and types)

-

-

-

-

-

VARIABLE

-

-

-

Reserved

-

-

-

VARIADIC

-

Reserved

-

-

-

-

-

VARYING

-

Non-reserved

-

Reserved

-

Reserved

-

VCGROUP

-

Non-reserved

-

-

-

-

-

VERBOSE

-

Reserved (functions and types allowed)

-

-

-

-

-

VERSION

-

Non-reserved

-

-

-

-

-

VERIFY

-

Reserved

-

-

-

-

-

VIEW

-

Non-reserved

-

Reserved

-

Reserved

-

VOLATILE

-

Non-reserved

-

-

-

-

-

WHEN

-

Reserved

-

Reserved

-

Reserved

-

WHENEVER

-

-

-

Reserved

-

Reserved

-

WHERE

-

Reserved

-

Reserved

-

Reserved

-

WHITESPACE

-

Non-reserved

-

-

-

-

-

WINDOW

-

Reserved

-

-

-

-

-

WITH

-

Reserved

-

Reserved

-

Reserved

-

WITHIN

-

Non-reserved

-

-

-

-

-

WITHOUT

-

Non-reserved

-

Reserved

-

-

-

WORK

-

Non-reserved

-

Reserved

-

Reserved

-

WORKLOAD

-

Non-reserved

-

-

-

-

-

WRAPPER

-

Non-reserved

-

-

-

-

-

WRITE

-

Non-reserved

-

Reserved

-

Reserved

-

XML

-

Non-reserved

-

-

-

-

-

XMLATTRIBUTES

-

Non-reserved (excluding functions and types)

-

-

-

-

-

XMLCONCAT

-

Non-reserved (excluding functions and types)

-

-

-

-

-

XMLELEMENT

-

Non-reserved (excluding functions and types)

-

-

-

-

-

XMLEXISTS

-

Non-reserved (excluding functions and types)

-

-

-

-

-

XMLFOREST

-

Non-reserved (excluding functions and types)

-

-

-

-

-

XMLPARSE

-

Non-reserved (excluding functions and types)

-

-

-

-

-

XMLPI

-

Non-reserved (excluding functions and types)

-

-

-

-

-

XMLROOT

-

Non-reserved (excluding functions and types)

-

-

-

-

-

XMLSERIALIZE

-

Non-reserved (excluding functions and types)

-

-

-

-

-

YEAR

-

Non-reserved

-

Reserved

-

Reserved

-

YES

-

Non-reserved

-

-

-

-

-

ZONE

-

Non-reserved

-

Reserved

-

Reserved

-
- - +# Keywords + +The SQL contains reserved and non-reserved words. Standards require that reserved keywords not be used as other identifiers. Non-reserved keywords have special meanings only in a specific environment and can be used as identifiers in other environments. + +The naming rules for identifiers are as follows: + +- An identifier name can only contain letters, underscores, digits \(0-9\), and dollar signs \($\). +- An identifier name must start with a letter \(a to z\) or an underscore \(\_\). + +**Table 1** SQL keywords + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Keyword

+

openGauss

+

SQL:1999

+

SQL-92

+

ABORT

+

Non-reserved

+

-

+

-

+

ABS

+

-

+

Non-reserved

+

-

+

ABSOLUTE

+

Non-reserved

+

Reserved

+

Reserved

+

ACCESS

+

Non-reserved

+

-

+

-

+

ACCOUNT

+

Non-reserved

+

-

+

-

+

ACTION

+

Non-reserved

+

Reserved

+

Reserved

+

ADA

+

-

+

Non-reserved

+

Non-reserved

+

ADD

+

Non-reserved

+

Reserved

+

Reserved

+

ADMIN

+

Non-reserved

+

Reserved

+

-

+

AFTER

+

Non-reserved

+

Reserved

+

-

+

AGGREGATE

+

Non-reserved

+

Reserved

+

-

+

ALIAS

+

-

+

Reserved

+

-

+

ALL

+

Reserved

+

Reserved

+

Reserved

+

ALLOCATE

+

-

+

Reserved

+

Reserved

+

ALSO

+

Non-reserved

+

-

+

-

+

ALTER

+

Non-reserved

+

Reserved

+

Reserved

+

ALWAYS

+

Non-reserved

+

-

+

-

+

ANALYSE

+

Reserved

+

-

+

-

+

ANALYZE

+

Reserved

+

-

+

-

+

AND

+

Reserved

+

Reserved

+

Reserved

+

ANY

+

Reserved

+

Reserved

+

Reserved

+

APP

+

Non-reserved

+

-

+

-

+

ARE

+

-

+

Reserved

+

Reserved

+

ARRAY

+

Reserved

+

Reserved

+

-

+

AS

+

Reserved

+

Reserved

+

Reserved

+

ASC

+

Reserved

+

Reserved

+

Reserved

+

ASENSITIVE

+

-

+

Non-reserved

+

-

+

ASSERTION

+

Non-reserved

+

Reserved

+

Reserved

+

ASSIGNMENT

+

Non-reserved

+

Non-reserved

+

-

+

ASYMMETRIC

+

Reserved

+

Non-reserved

+

-

+

AT

+

Non-reserved

+

Reserved

+

Reserved

+

ATOMIC

+

-

+

Non-reserved

+

-

+

ATTRIBUTE

+

Non-reserved

+

-

+

-

+

AUTHID

+

Reserved

+

-

+

-

+

AUTHORIZATION

+

Reserved (functions and types allowed)

+

Reserved

+

Reserved

+

AUTOEXTEND

+

Non-reserved

+

-

+

-

+

AUTOMAPPED

+

Non-reserved

+

-

+

-

+

AVG

+

-

+

Non-reserved

+

Reserved

+

BACKWARD

+

Non-reserved

+

-

+

-

+

BARRIER

+

Non-reserved

+

-

+

-

+

BEFORE

+

Non-reserved

+

Reserved

+

-

+

BEGIN

+

Non-reserved

+

Reserved

+

Reserved

+

BEGIN_NON_ANOYBLOCK

+

Non-reserved

+

-

+

-

+

BETWEEN

+

Non-reserved (excluding functions and types)

+

Non-reserved

+

Reserved

+

BIGINT

+

Non-reserved (excluding functions and types)

+

-

+

-

+

BINARY

+

Reserved (functions and types allowed)

+

Reserved

+

-

+

BINARY_DOUBLE

+

Non-reserved (excluding functions and types)

+

-

+

-

+

BINARY_INTEGER

+

Non-reserved (excluding functions and types)

+

-

+

-

+

BIT

+

Non-reserved (excluding functions and types)

+

Reserved

+

Reserved

+

BITVAR

+

-

+

Non-reserved

+

-

+

BIT_LENGTH

+

-

+

Non-reserved

+

Reserved

+

BLOB

+

Non-reserved

+

Reserved

+

-

+

BOOLEAN

+

Non-reserved (excluding functions and types)

+

Reserved

+

-

+

BOTH

+

Reserved

+

Reserved

+

Reserved

+

BUCKETS

+

Reserved

+

-

+

-

+

BREADTH

+

-

+

Reserved

+

-

+

BY

+

Non-reserved

+

Reserved

+

Reserved

+

C

+

-

+

Non-reserved

+

Non-reserved

+

CACHE

+

Non-reserved

+

-

+

-

+

CALL

+

Non-reserved

+

Reserved

+

-

+

CALLED

+

Non-reserved

+

Non-reserved

+

-

+

CARDINALITY

+

-

+

Non-reserved

+

-

+

CASCADE

+

Non-reserved

+

Reserved

+

Reserved

+

CASCADED

+

Non-reserved

+

Reserved

+

Reserved

+

CASE

+

Reserved

+

Reserved

+

Reserved

+

CAST

+

Reserved

+

Reserved

+

Reserved

+

CATALOG

+

Non-reserved

+

Reserved

+

Reserved

+

CATALOG_NAME

+

-

+

Non-reserved

+

Non-reserved

+

CHAIN

+

Non-reserved

+

Non-reserved

+

-

+

CHAR

+

Non-reserved (excluding functions and types)

+

Reserved

+

Reserved

+

CHARACTER

+

Non-reserved (excluding functions and types)

+

Reserved

+

Reserved

+

CHARACTERISTICS

+

Non-reserved

+

-

+

-

+

CHARACTER_LENGTH

+

-

+

Non-reserved

+

Reserved

+

CHARACTER_SET_CATALOG

+

-

+

Non-reserved

+

Non-reserved

+

CHARACTER_SET_NAME

+

-

+

Non-reserved

+

Non-reserved

+

CHARACTER_SET_SCHEMA

+

-

+

Non-reserved

+

Non-reserved

+

CHAR_LENGTH

+

-

+

Non-reserved

+

Reserved

+

CHECK

+

Reserved

+

Reserved

+

Reserved

+

CHECKED

+

-

+

Non-reserved

+

-

+

CHECKPOINT

+

Non-reserved

+

-

+

-

+

CLASS

+

Non-reserved

+

Reserved

+

-

+

CLEAN

+

Non-reserved

+

-

+

-

+

CLASS_ORIGIN

+

-

+

Non-reserved

+

Non-reserved

+

CLOB

+

Non-reserved

+

Reserved

+

-

+

CLOSE

+

Non-reserved

+

Reserved

+

Reserved

+

CLUSTER

+

Non-reserved

+

-

+

-

+

COALESCE

+

Non-reserved (excluding functions and types)

+

Non-reserved

+

Reserved

+

COBOL

+

-

+

Non-reserved

+

Non-reserved

+

COLLATE

+

Reserved

+

Reserved

+

Reserved

+

COLLATION

+

Reserved (functions and types allowed)

+

Reserved

+

Reserved

+

COLLATION_CATALOG

+

-

+

Non-reserved

+

Non-reserved

+

COLLATION_NAME

+

-

+

Non-reserved

+

Non-reserved

+

COLLATION_SCHEMA

+

-

+

Non-reserved

+

Non-reserved

+

COLUMN

+

Reserved

+

Reserved

+

Reserved

+

COLUMN_NAME

+

-

+

Non-reserved

+

Non-reserved

+

COMMAND_FUNCTION

+

-

+

Non-reserved

+

Non-reserved

+

COMMAND_FUNCTION_CODE

+

-

+

Non-reserved

+

-

+

COMMENT

+

Non-reserved

+

-

+

-

+

COMMENTS

+

Non-reserved

+

-

+

-

+

COMMIT

+

Non-reserved

+

Reserved

+

Reserved

+

COMMITTED

+

Non-reserved

+

Non-reserved

+

Non-reserved

+

COMPRESS

+

Non-reserved

+

-

+

-

+

COMPLETION

+

-

+

Reserved

+

-

+

CONCURRENTLY

+

Reserved (functions and types allowed)

+

-

+

-

+

CONDITION

+

-

+

-

+

-

+

CONDITION_NUMBER

+

-

+

Non-reserved

+

Non-reserved

+

CONFIGURATION

+

Non-reserved

+

-

+

-

+

CONNECT

+

-

+

Reserved

+

Reserved

+

CONNECTION

+

Non-reserved

+

Reserved

+

Reserved

+

CONNECTION_NAME

+

-

+

Non-reserved

+

Non-reserved

+

CONSTRAINT

+

Reserved

+

Reserved

+

Reserved

+

CONSTRAINTS

+

Non-reserved

+

Reserved

+

Reserved

+

CONSTRAINT_CATALOG

+

-

+

Non-reserved

+

Non-reserved

+

CONSTRAINT_NAME

+

-

+

Non-reserved

+

Non-reserved

+

CONSTRAINT_SCHEMA

+

-

+

Non-reserved

+

Non-reserved

+

CONSTRUCTOR

+

-

+

Reserved

+

-

+

CONTAINS

+

-

+

Non-reserved

+

-

+

CONTENT

+

Non-reserved

+

-

+

-

+

CONTINUE

+

Non-reserved

+

Reserved

+

Reserved

+

CONVERSION

+

Non-reserved

+

-

+

-

+

CONVERT

+

-

+

Non-reserved

+

Reserved

+

COORDINATOR

+

Non-reserved

+

-

+

-

+

COPY

+

Non-reserved

+

-

+

-

+

CORRESPONDING

+

-

+

Reserved

+

Reserved

+

COST

+

Non-reserved

+

-

+

-

+

COUNT

+

-

+

Non-reserved

+

Reserved

+

CREATE

+

Reserved

+

Reserved

+

Reserved

+

CROSS

+

Reserved (functions and types allowed)

+

Reserved

+

Reserved

+

CSV

+

Non-reserved

+

-

+

-

+

CUBE

+

-

+

Reserved

+

-

+

CURRENT

+

Non-reserved

+

Reserved

+

Reserved

+

CURRENT_CATALOG

+

Reserved

+

-

+

-

+

CURRENT_DATE

+

Reserved

+

Reserved

+

Reserved

+

CURRENT_PATH

+

-

+

Reserved

+

-

+

CURRENT_ROLE

+

Reserved

+

Reserved

+

-

+

CURRENT_SCHEMA

+

Reserved (functions and types allowed)

+

-

+

-

+

CURRENT_TIME

+

Reserved

+

Reserved

+

Reserved

+

CURRENT_TIMESTAMP

+

Reserved

+

Reserved

+

Reserved

+

CURRENT_USER

+

Reserved

+

Reserved

+

Reserved

+

CURSOR

+

Non-reserved

+

Reserved

+

Reserved

+

CURSOR_NAME

+

-

+

Non-reserved

+

Non-reserved

+

CYCLE

+

Non-reserved

+

Reserved

+

-

+

DATA

+

Non-reserved

+

Reserved

+

Non-reserved

+

DATABASE

+

Non-reserved

+

-

+

-

+

DATAFILE

+

Non-reserved

+

-

+

-

+

DATE

+

Non-reserved (excluding functions and types)

+

Reserved

+

Reserved

+

DATETIME_INTERVAL_CODE

+

-

+

Non-reserved

+

Non-reserved

+

DATETIME_INTERVAL_PRECISION

+

-

+

Non-reserved

+

Non-reserved

+

DAY

+

Non-reserved

+

Reserved

+

Reserved

+

DBCOMPATIBILITY

+

Non-reserved

+

-

+

-

+

DEALLOCATE

+

Non-reserved

+

Reserved

+

Reserved

+

DEC

+

Non-reserved (excluding functions and types)

+

Reserved

+

Reserved

+

DECIMAL

+

Non-reserved (excluding functions and types)

+

Reserved

+

Reserved

+

DECLARE

+

Non-reserved

+

Reserved

+

Reserved

+

DECODE

+

Non-reserved (excluding functions and types)

+

-

+

-

+

DEFAULT

+

Reserved

+

Reserved

+

Reserved

+

DEFAULTS

+

Non-reserved

+

-

+

-

+

DEFERRABLE

+

Reserved

+

Reserved

+

Reserved

+

DEFERRED

+

Non-reserved

+

Reserved

+

Reserved

+

DEFINED

+

-

+

Non-reserved

+

-

+

DEFINER

+

Non-reserved

+

Non-reserved

+

-

+

DELETE

+

Non-reserved

+

Reserved

+

Reserved

+

DELIMITER

+

Non-reserved

+

-

+

-

+

DELIMITERS

+

Non-reserved

+

-

+

-

+

DELTA

+

Non-reserved

+

-

+

-

+

DEPTH

+

-

+

Reserved

+

-

+

DEREF

+

-

+

Reserved

+

-

+

DESC

+

Reserved

+

Reserved

+

Reserved

+

DESCRIBE

+

-

+

Reserved

+

Reserved

+

DESCRIPTOR

+

-

+

Reserved

+

Reserved

+

DESTROY

+

-

+

Reserved

+

-

+

DESTRUCTOR

+

-

+

Reserved

+

-

+

DETERMINISTIC

+

Non-reserved

+

Reserved

+

-

+

DIAGNOSTICS

+

-

+

Reserved

+

Reserved

+

DICTIONARY

+

Non-reserved

+

Reserved

+

-

+

DIRECT

+

Non-reserved

+

-

+

-

+

DIRECTORY

+

Non-reserved

+

-

+

-

+

DISABLE

+

Non-reserved

+

-

+

-

+

DISCARD

+

Non-reserved

+

-

+

-

+

DISCONNECT

+

-

+

Reserved

+

Reserved

+

DISPATCH

+

-

+

Non-reserved

+

-

+

DISTINCT

+

Reserved

+

Reserved

+

Reserved

+

DISTRIBUTE

+

Non-reserved

+

-

+

-

+

DISTRIBUTION

+

Non-reserved

+

-

+

-

+

DO

+

Reserved

+

-

+

-

+

DOCUMENT

+

Non-reserved

+

-

+

-

+

DOMAIN

+

Non-reserved

+

Reserved

+

Reserved

+

DOUBLE

+

Non-reserved

+

Reserved

+

Reserved

+

DROP

+

Non-reserved

+

Reserved

+

Reserved

+

DUPLICATE

+

Non-reserved

+

-

+

-

+

DYNAMIC

+

-

+

Reserved

+

-

+

DYNAMIC_FUNCTION

+

-

+

Non-reserved

+

Non-reserved

+

DYNAMIC_FUNCTION_CODE

+

-

+

Non-reserved

+

-

+

EACH

+

Non-reserved

+

Reserved

+

-

+

ELSE

+

Reserved

+

Reserved

+

Reserved

+

ENABLE

+

Non-reserved

+

-

+

-

+

ENCODING

+

Non-reserved

+

-

+

-

+

ENCRYPTED

+

Non-reserved

+

-

+

-

+

END

+

Reserved

+

Reserved

+

Reserved

+

END-EXEC

+

-

+

Reserved

+

Reserved

+

ENFORCED

+

Non-reserved

+

-

+

-

+

ENUM

+

Non-reserved

+

-

+

-

+

EOL

+

Non-reserved

+

-

+

-

+

EQUALS

+

-

+

Reserved

+

-

+

ESCAPE

+

Non-reserved

+

Reserved

+

Reserved

+

ESCAPING

+

Non-reserved

+

-

+

-

+

EVERY

+

Non-reserved

+

Reserved

+

-

+

EXCEPT

+

Reserved

+

Reserved

+

Reserved

+

EXCEPTION

+

-

+

Reserved

+

Reserved

+

EXCHANGE

+

Non-reserved

+

-

+

-

+

EXCLUDE

+

Non-reserved

+

-

+

-

+

EXCLUDING

+

Non-reserved

+

-

+

-

+

EXCLUSIVE

+

Non-reserved

+

-

+

-

+

EXEC

+

-

+

Reserved

+

Reserved

+

EXECUTE

+

Non-reserved

+

Reserved

+

Reserved

+

EXISTING

+

-

+

Non-reserved

+

-

+

EXISTS

+

Non-reserved (excluding functions and types)

+

Non-reserved

+

Reserved

+

EXPLAIN

+

Non-reserved

+

-

+

-

+

EXTENSION

+

Non-reserved

+

-

+

-

+

EXTERNAL

+

Non-reserved

+

Reserved

+

Reserved

+

EXTRACT

+

Non-reserved (excluding functions and types)

+

Non-reserved

+

Reserved

+

FALSE

+

Reserved

+

Reserved

+

Reserved

+

FAMILY

+

Non-reserved

+

-

+

-

+

FAST

+

Non-reserved

+

-

+

-

+

FETCH

+

Reserved

+

Reserved

+

Reserved

+

FILEHEADER

+

Non-reserved

+

-

+

-

+

FINAL

+

-

+

Non-reserved

+

-

+

FIRST

+

Non-reserved

+

Reserved

+

Reserved

+

FIXED

+

Non-reserved

+

Reserved

+

Reserved

+

FLOAT

+

Non-reserved (excluding functions and types)

+

Reserved

+

Reserved

+

FOLLOWING

+

Non-reserved

+

-

+

-

+

FOR

+

Reserved

+

Reserved

+

Reserved

+

FORCE

+

Non-reserved

+

-

+

-

+

FOREIGN

+

Reserved

+

Reserved

+

Reserved

+

FORMATTER

+

Non-reserved

+

-

+

-

+

FORTRAN

+

-

+

Non-reserved

+

Non-reserved

+

FORWARD

+

Non-reserved

+

-

+

-

+

FOUND

+

-

+

Reserved

+

Reserved

+

FREE

+

-

+

Reserved

+

-

+

FREEZE

+

Reserved (functions and types allowed)

+

-

+

-

+

FROM

+

Reserved

+

Reserved

+

Reserved

+

FULL

+

Reserved (functions and types allowed)

+

Reserved

+

Reserved

+

FUNCTION

+

Non-reserved

+

Reserved

+

-

+

FUNCTIONS

+

Non-reserved

+

-

+

-

+

G

+

-

+

Non-reserved

+

-

+

GENERAL

+

-

+

Reserved

+

-

+

GENERATED

+

-

+

Non-reserved

+

-

+

GET

+

-

+

Reserved

+

Reserved

+

GLOBAL

+

Non-reserved

+

Reserved

+

Reserved

+

GO

+

-

+

Reserved

+

Reserved

+

GOTO

+

-

+

Reserved

+

Reserved

+

GRANT

+

Reserved

+

Reserved

+

Reserved

+

GRANTED

+

Non-reserved

+

Non-reserved

+

-

+

GREATEST

+

Non-reserved (excluding functions and types)

+

-

+

-

+

GROUP

+

Reserved

+

Reserved

+

Reserved

+

GROUPING

+

-

+

Reserved

+

-

+

HANDLER

+

Non-reserved

+

-

+

-

+

HAVING

+

Reserved

+

Reserved

+

Reserved

+

HEADER

+

Non-reserved

+

-

+

-

+

HIERARCHY

+

-

+

Non-reserved

+

-

+

HOLD

+

Non-reserved

+

Non-reserved

+

-

+

HOST

+

-

+

Reserved

+

-

+

HOUR

+

Non-reserved

+

Reserved

+

Reserved

+

IDENTIFIED

+

Non-reserved

+

-

+

-

+

IDENTITY

+

Non-reserved

+

Reserved

+

Reserved

+

IF

+

Non-reserved

+

-

+

-

+

IGNORE

+

-

+

Reserved

+

-

+

ILIKE

+

Reserved (functions and types allowed)

+

-

+

-

+

IMMEDIATE

+

Non-reserved

+

Reserved

+

Reserved

+

IMMUTABLE

+

Non-reserved

+

-

+

-

+

IMPLEMENTATION

+

-

+

Non-reserved

+

-

+

IMPLICIT

+

Non-reserved

+

-

+

-

+

IN

+

Reserved

+

Reserved

+

Reserved

+

INCLUDING

+

Non-reserved

+

-

+

-

+

INCREMENT

+

Non-reserved

+

-

+

-

+

INDEX

+

Non-reserved

+

-

+

-

+

INDEXES

+

Non-reserved

+

-

+

-

+

INDICATOR

+

-

+

Reserved

+

Reserved

+

INFIX

+

-

+

Non-reserved

+

-

+

INHERIT

+

Non-reserved

+

-

+

-

+

INHERITS

+

Non-reserved

+

-

+

-

+

INITIAL

+

Non-reserved

+

-

+

-

+

INITIALIZE

+

-

+

Reserved

+

-

+

INITIALLY

+

Reserved

+

Reserved

+

Reserved

+

INITRANS

+

Non-reserved

+

-

+

-

+

INLINE

+

Non-reserved

+

-

+

-

+

INNER

+

Reserved (functions and types allowed)

+

Reserved

+

Reserved

+

INOUT

+

Non-reserved (excluding functions and types)

+

Reserved

+

-

+

INPUT

+

Non-reserved

+

Reserved

+

Reserved

+

INSENSITIVE

+

Non-reserved

+

Non-reserved

+

Reserved

+

INSERT

+

Non-reserved

+

Reserved

+

Reserved

+

INSTANCE

+

-

+

Non-reserved

+

-

+

INSTANTIABLE

+

-

+

Non-reserved

+

-

+

INSTEAD

+

Non-reserved

+

-

+

-

+

INT

+

Non-reserved (excluding functions and types)

+

Reserved

+

Reserved

+

INTEGER

+

Non-reserved (excluding functions and types)

+

Reserved

+

Reserved

+

INTERSECT

+

Reserved

+

Reserved

+

Reserved

+

INTERVAL

+

Non-reserved (excluding functions and types)

+

Reserved

+

Reserved

+

INTO

+

Reserved

+

Reserved

+

Reserved

+

INVOKER

+

Non-reserved

+

Non-reserved

+

-

+

IS

+

Reserved

+

Reserved

+

Reserved

+

ISNULL

+

Non-reserved

+

-

+

-

+

ISOLATION

+

Non-reserved

+

Reserved

+

Reserved

+

ITERATE

+

-

+

Reserved

+

-

+

JOIN

+

Reserved (functions and types allowed)

+

Reserved

+

Reserved

+

K

+

-

+

Non-reserved

+

-

+

KEY

+

Non-reserved

+

Reserved

+

Reserved

+

KEY_MEMBER

+

-

+

Non-reserved

+

-

+

KEY_TYPE

+

-

+

Non-reserved

+

-

+

LABEL

+

Non-reserved

+

-

+

-

+

LANGUAGE

+

Non-reserved

+

Reserved

+

Reserved

+

LARGE

+

Non-reserved

+

Reserved

+

-

+

LAST

+

Non-reserved

+

Reserved

+

Reserved

+

LATERAL

+

-

+

Reserved

+

-

+

LC_COLLATE

+

Non-reserved

+

-

+

-

+

LC_CTYPE

+

Non-reserved

+

-

+

-

+

LEADING

+

Reserved

+

Reserved

+

Reserved

+

LEAKPROOF

+

Non-reserved

+

-

+

-

+

LEAST

+

Non-reserved (excluding functions and types)

+

-

+

-

+

LEFT

+

Reserved (functions and types allowed)

+

Reserved

+

Reserved

+

LENGTH

+

-

+

Non-reserved

+

Non-reserved

+

LESS

+

Reserved

+

Reserved

+

-

+

LEVEL

+

Non-reserved

+

Reserved

+

Reserved

+

LIKE

+

Reserved (functions and types allowed)

+

Reserved

+

Reserved

+

LIMIT

+

Reserved

+

Reserved

+

-

+

LISTEN

+

Non-reserved

+

-

+

-

+

LOAD

+

Non-reserved

+

-

+

-

+

LOCAL

+

Non-reserved

+

Reserved

+

Reserved

+

LOCALTIME

+

Reserved

+

Reserved

+

-

+

LOCALTIMESTAMP

+

Reserved

+

Reserved

+

-

+

LOCATION

+

Non-reserved

+

-

+

-

+

LOCATOR

+

-

+

Reserved

+

-

+

LOCK

+

Non-reserved

+

-

+

-

+

LOG

+

Non-reserved

+

-

+

-

+

LOGGING

+

Non-reserved

+

-

+

-

+

LOGIN

+

Non-reserved

+

-

+

-

+

LOOP

+

Non-reserved

+

-

+

-

+

LOWER

+

-

+

Non-reserved

+

Reserved

+

M

+

-

+

Non-reserved

+

-

+

MAP

+

-

+

Reserved

+

-

+

MAPPING

+

Non-reserved

+

-

+

-

+

MATCH

+

Non-reserved

+

Reserved

+

Reserved

+

MATCHED

+

Non-reserved

+

-

+

-

+

MAX

+

-

+

Non-reserved

+

Reserved

+

MAXEXTENTS

+

Non-reserved

+

-

+

-

+

MAXSIZE

+

Non-reserved

+

-

+

-

+

MAXTRANS

+

Non-reserved

+

-

+

-

+

MAXVALUE

+

Reserved

+

-

+

-

+

MERGE

+

Non-reserved

+

-

+

-

+

MESSAGE_LENGTH

+

-

+

Non-reserved

+

Non-reserved

+

MESSAGE_OCTET_LENGTH

+

-

+

Non-reserved

+

Non-reserved

+

MESSAGE_TEXT

+

-

+

Non-reserved

+

Non-reserved

+

METHOD

+

-

+

Non-reserved

+

-

+

MIN

+

-

+

Non-reserved

+

Reserved

+

MINEXTENTS

+

Non-reserved

+

-

+

-

+

MINUS

+

Reserved

+

-

+

-

+

MINUTE

+

Non-reserved

+

Reserved

+

Reserved

+

MINVALUE

+

Non-reserved

+

-

+

-

+

MOD

+

-

+

Non-reserved

+

-

+

MODE

+

Non-reserved

+

-

+

-

+

MODIFIES

+

-

+

Reserved

+

-

+

MODIFY

+

Reserved

+

Reserved

+

-

+

MODULE

+

-

+

Reserved

+

Reserved

+

MONTH

+

Non-reserved

+

Reserved

+

Reserved

+

MORE

+

-

+

Non-reserved

+

Non-reserved

+

MOVE

+

Non-reserved

+

-

+

-

+

MOVEMENT

+

Non-reserved

+

-

+

-

+

MUMPS

+

-

+

Non-reserved

+

Non-reserved

+

NAME

+

Non-reserved

+

Non-reserved

+

Non-reserved

+

NAMES

+

Non-reserved

+

Reserved

+

Reserved

+

NATIONAL

+

Non-reserved (excluding functions and types)

+

Reserved

+

Reserved

+

NATURAL

+

Reserved (functions and types allowed)

+

Reserved

+

Reserved

+

NCHAR

+

Non-reserved (excluding functions and types)

+

Reserved

+

Reserved

+

NCLOB

+

-

+

Reserved

+

-

+

NEW

+

-

+

Reserved

+

-

+

NEXT

+

Non-reserved

+

Reserved

+

Reserved

+

NLSSORT

+

Reserved

+

-

+

-

+

NO

+

Non-reserved

+

Reserved

+

Reserved

+

NOCOMPRESS

+

Non-reserved

+

-

+

-

+

NOCYCLE

+

Non-reserved

+

-

+

-

+

NODE

+

Non-reserved

+

-

+

-

+

NOLOGGING

+

Non-reserved

+

-

+

-

+

NOLOGIN

+

Non-reserved

+

-

+

-

+

NOMAXVALUE

+

Non-reserved

+

-

+

-

+

NOMINVALUE

+

Non-reserved

+

-

+

-

+

NONE

+

Non-reserved (excluding functions and types)

+

Reserved

+

-

+

NOT

+

Reserved

+

Reserved

+

Reserved

+

NOTHING

+

Non-reserved

+

-

+

-

+

NOTIFY

+

Non-reserved

+

-

+

-

+

NOTNULL

+

Reserved (functions and types allowed)

+

-

+

-

+

NOWAIT

+

Non-reserved

+

-

+

-

+

NULL

+

Reserved

+

Reserved

+

Reserved

+

NULLABLE

+

-

+

Non-reserved

+

Non-reserved

+

NULLIF

+

Non-reserved (excluding functions and types)

+

Non-reserved

+

Reserved

+

NULLS

+

Non-reserved

+

-

+

-

+

NUMBER

+

Non-reserved (excluding functions and types)

+

Non-reserved

+

Non-reserved

+

NUMERIC

+

Non-reserved (excluding functions and types)

+

Reserved

+

Reserved

+

NUMSTR

+

Non-reserved

+

-

+

-

+

NVARCHAR2

+

Non-reserved (excluding functions and types)

+

-

+

-

+

NVL

+

Non-reserved (excluding functions and types)

+

-

+

-

+

OBJECT

+

Non-reserved

+

Reserved

+

-

+

OCTET_LENGTH

+

-

+

Non-reserved

+

Reserved

+

OF

+

Non-reserved

+

Reserved

+

Reserved

+

OFF

+

Non-reserved

+

Reserved

+

-

+

OFFSET

+

Reserved

+

-

+

-

+

OIDS

+

Non-reserved

+

-

+

-

+

OLD

+

-

+

Reserved

+

-

+

ON

+

Reserved

+

Reserved

+

Reserved

+

ONLY

+

Reserved

+

Reserved

+

Reserved

+

OPEN

+

-

+

Reserved

+

Reserved

+

OPERATION

+

-

+

Reserved

+

-

+

OPERATOR

+

Non-reserved

+

-

+

-

+

OPTIMIZATION

+

Non-reserved

+

-

+

-

+

OPTION

+

Non-reserved

+

Reserved

+

Reserved

+

OPTIONS

+

Non-reserved

+

Non-reserved

+

-

+

OR

+

Reserved

+

Reserved

+

Reserved

+

ORDER

+

Reserved

+

Reserved

+

Reserved

+

ORDINALITY

+

-

+

Reserved

+

-

+

OUT

+

Non-reserved (excluding functions and types)

+

Reserved

+

-

+

OUTER

+

Reserved (functions and types allowed)

+

Reserved

+

Reserved

+

OUTPUT

+

-

+

Reserved

+

Reserved

+

OVER

+

Non-reserved

+

-

+

-

+

OVERLAPS

+

Reserved (functions and types allowed)

+

Non-reserved

+

Reserved

+

OVERLAY

+

Non-reserved (excluding functions and types)

+

Non-reserved

+

-

+

OVERRIDING

+

-

+

Non-reserved

+

-

+

OWNED

+

Non-reserved

+

-

+

-

+

OWNER

+

Non-reserved

+

-

+

-

+

PAD

+

-

+

Reserved

+

Reserved

+

PARAMETER

+

-

+

Reserved

+

-

+

PARAMETERS

+

-

+

Reserved

+

-

+

PARAMETER_MODE

+

-

+

Non-reserved

+

-

+

PARAMETER_NAME

+

-

+

Non-reserved

+

-

+

PARAMETER_ORDINAL_POSITION

+

-

+

Non-reserved

+

-

+

PARAMETER_SPECIFIC_CATALOG

+

-

+

Non-reserved

+

-

+

PARAMETER_SPECIFIC_NAME

+

-

+

Non-reserved

+

-

+

PARAMETER_SPECIFIC_SCHEMA

+

-

+

Non-reserved

+

-

+

PARSER

+

Non-reserved

+

-

+

-

+

PARTIAL

+

Non-reserved

+

Reserved

+

Reserved

+

PARTITION

+

Non-reserved

+

-

+

-

+

PARTITIONS

+

Non-reserved

+

-

+

-

+

PASCAL

+

-

+

Non-reserved

+

Non-reserved

+

PASSING

+

Non-reserved

+

-

+

-

+

PASSWORD

+

Non-reserved

+

-

+

-

+

PATH

+

-

+

Reserved

+

-

+

PCTFREE

+

Non-reserved

+

-

+

-

+

PER

+

Non-reserved

+

-

+

-

+

PERCENT

+

Non-reserved

+

-

+

-

+

PERFORMANCE

+

Reserved

+

-

+

-

+

PLACING

+

Reserved

+

-

+

-

+

PLANS

+

Non-reserved

+

-

+

-

+

PLI

+

-

+

Non-reserved

+

Non-reserved

+

POOL

+

Non-reserved

+

-

+

-

+

POSITION

+

Non-reserved (excluding functions and types)

+

Non-reserved

+

Reserved

+

POSTFIX

+

-

+

Reserved

+

-

+

PRECEDING

+

Non-reserved

+

-

+

-

+

PRECISION

+

Non-reserved (excluding functions and types)

+

Reserved

+

Reserved

+

PREFERRED

+

Non-reserved

+

-

+

-

+

PREFIX

+

Non-reserved

+

Reserved

+

-

+

PREORDER

+

-

+

Reserved

+

-

+

PREPARE

+

Non-reserved

+

Reserved

+

Reserved

+

PREPARED

+

Non-reserved

+

-

+

-

+

PRESERVE

+

Non-reserved

+

Reserved

+

Reserved

+

PRIMARY

+

Reserved

+

Reserved

+

Reserved

+

PRIOR

+

Non-reserved

+

Reserved

+

Reserved

+

PRIVILEGE

+

Non-reserved

+

-

+

-

+

PRIVILEGES

+

Non-reserved

+

Reserved

+

Reserved

+

PROCEDURAL

+

Non-reserved

+

-

+

-

+

PROCEDURE

+

Reserved

+

Reserved

+

Reserved

+

PROFILE

+

Non-reserved

+

-

+

-

+

PUBLIC

+

-

+

Reserved

+

Reserved

+

QUERY

+

Non-reserved

+

-

+

-

+

QUOTE

+

Non-reserved

+

-

+

-

+

RANGE

+

Non-reserved

+

-

+

-

+

RAW

+

Non-reserved

+

-

+

-

+

READ

+

Non-reserved

+

Reserved

+

Reserved

+

READS

+

-

+

Reserved

+

-

+

REAL

+

Non-reserved (excluding functions and types)

+

Reserved

+

Reserved

+

REASSIGN

+

Non-reserved

+

-

+

-

+

REBUILD

+

Non-reserved

+

-

+

-

+

RECHECK

+

Non-reserved

+

-

+

-

+

RECURSIVE

+

Non-reserved

+

Reserved

+

-

+

REF

+

Non-reserved

+

Reserved

+

-

+

REFERENCES

+

Reserved

+

Reserved

+

Reserved

+

REFERENCING

+

-

+

Reserved

+

-

+

REINDEX

+

Non-reserved

+

-

+

-

+

REJECT

+

Reserved

+

-

+

-

+

RELATIVE

+

Non-reserved

+

Reserved

+

Reserved

+

RELEASE

+

Non-reserved

+

-

+

-

+

RELOPTIONS

+

Non-reserved

+

-

+

-

+

REMOTE

+

Non-reserved

+

-

+

-

+

RENAME

+

Non-reserved

+

-

+

-

+

REPEATABLE

+

Non-reserved

+

Non-reserved

+

Non-reserved

+

REPLACE

+

Non-reserved

+

-

+

-

+

REPLICA

+

Non-reserved

+

-

+

-

+

RESET

+

Non-reserved

+

-

+

-

+

RESIZE

+

Non-reserved

+

-

+

-

+

RESOURCE

+

Non-reserved

+

-

+

-

+

RESTART

+

Non-reserved

+

-

+

-

+

RESTRICT

+

Non-reserved

+

Reserved

+

Reserved

+

RESULT

+

-

+

Reserved

+

-

+

RETURN

+

Non-reserved

+

Reserved

+

-

+

RETURNED_LENGTH

+

-

+

Non-reserved

+

Non-reserved

+

RETURNED_OCTET_LENGTH

+

-

+

Non-reserved

+

Non-reserved

+

RETURNED_SQLSTATE

+

-

+

Non-reserved

+

Non-reserved

+

RETURNING

+

Reserved

+

-

+

-

+

RETURNS

+

Non-reserved

+

Reserved

+

-

+

REUSE

+

Non-reserved

+

-

+

-

+

REVOKE

+

Non-reserved

+

Reserved

+

Reserved

+

RIGHT

+

Reserved (functions and types allowed)

+

Reserved

+

Reserved

+

ROLE

+

Non-reserved

+

Reserved

+

-

+

ROLLBACK

+

Non-reserved

+

Reserved

+

Reserved

+

ROLLUP

+

-

+

Reserved

+

-

+

ROUTINE

+

-

+

Reserved

+

-

+

ROUTINE_CATALOG

+

-

+

Non-reserved

+

-

+

ROUTINE_NAME

+

-

+

Non-reserved

+

-

+

ROUTINE_SCHEMA

+

-

+

Non-reserved

+

-

+

ROW

+

Non-reserved (excluding functions and types)

+

Reserved

+

-

+

ROWS

+

Non-reserved

+

Reserved

+

Reserved

+

ROW_COUNT

+

-

+

Non-reserved

+

Non-reserved

+

RULE

+

Non-reserved

+

-

+

-

+

SAVEPOINT

+

Non-reserved

+

Reserved

+

-

+

SCALE

+

-

+

Non-reserved

+

Non-reserved

+

SCHEMA

+

Non-reserved

+

Reserved

+

Reserved

+

SCHEMA_NAME

+

-

+

Non-reserved

+

Non-reserved

+

SCOPE

+

-

+

Reserved

+

-

+

SCROLL

+

Non-reserved

+

Reserved

+

Reserved

+

SEARCH

+

Non-reserved

+

Reserved

+

-

+

SECOND

+

Non-reserved

+

Reserved

+

Reserved

+

SECTION

+

-

+

Reserved

+

Reserved

+

SECURITY

+

Non-reserved

+

Non-reserved

+

-

+

SELECT

+

Reserved

+

Reserved

+

Reserved

+

SELF

+

-

+

Non-reserved

+

-

+

SENSITIVE

+

-

+

Non-reserved

+

-

+

SEQUENCE

+

Non-reserved

+

Reserved

+

-

+

SEQUENCES

+

Non-reserved

+

-

+

-

+

SERIALIZABLE

+

Non-reserved

+

Non-reserved

+

Non-reserved

+

SERVER

+

Non-reserved

+

-

+

-

+

SERVER_NAME

+

-

+

Non-reserved

+

Non-reserved

+

SESSION

+

Non-reserved

+

Reserved

+

Reserved

+

SESSION_USER

+

Reserved

+

Reserved

+

Reserved

+

SET

+

Non-reserved

+

Reserved

+

Reserved

+

SETOF

+

Non-reserved (excluding functions and types)

+

-

+

-

+

SETS

+

-

+

Reserved

+

-

+

SHARE

+

Non-reserved

+

-

+

-

+

SHOW

+

Non-reserved

+

-

+

-

+

SIMILAR

+

Reserved (functions and types allowed)

+

Non-reserved

+

-

+

SIMPLE

+

Non-reserved

+

Non-reserved

+

-

+

SIZE

+

Non-reserved

+

Reserved

+

Reserved

+

SMALLDATETIME

+

Non-reserved (excluding functions and types)

+

-

+

-

+

SMALLINT

+

Non-reserved (excluding functions and types)

+

Reserved

+

Reserved

+

SNAPSHOT

+

Non-reserved

+

-

+

-

+

SOME

+

Reserved

+

Reserved

+

Reserved

+

SOURCE

+

-

+

Non-reserved

+

-

+

SPACE

+

-

+

Reserved

+

Reserved

+

SPECIFIC

+

-

+

Reserved

+

-

+

SPECIFICTYPE

+

-

+

Reserved

+

-

+

SPECIFIC_NAME

+

-

+

Non-reserved

+

-

+

SPILL

+

Non-reserved

+

-

+

-

+

SPLIT

+

Reserved

+

-

+

-

+

SQL

+

-

+

Reserved

+

Reserved

+

SQLCODE

+

-

+

-

+

Reserved

+

SQLERROR

+

-

+

-

+

Reserved

+

SQLEXCEPTION

+

-

+

Reserved

+

-

+

SQLSTATE

+

-

+

Reserved

+

Reserved

+

SQLWARNING

+

-

+

Reserved

+

-

+

STABLE

+

Non-reserved

+

-

+

-

+

STANDALONE

+

Non-reserved

+

-

+

-

+

START

+

Non-reserved

+

Reserved

+

-

+

STATE

+

-

+

Reserved

+

-

+

STATEMENT

+

Non-reserved

+

Reserved

+

-

+

STATIC

+

-

+

Reserved

+

-

+

STATISTICS

+

Non-reserved

+

-

+

-

+

STDIN

+

Non-reserved

+

-

+

-

+

STDOUT

+

Non-reserved

+

-

+

-

+

STORAGE

+

Non-reserved

+

-

+

-

+

STORE

+

Non-reserved

+

-

+

-

+

STRICT

+

Non-reserved

+

-

+

-

+

STRIP

+

Non-reserved

+

-

+

-

+

STRUCTURE

+

-

+

Reserved

+

-

+

STYLE

+

-

+

Non-reserved

+

-

+

SUBCLASS_ORIGIN

+

-

+

Non-reserved

+

Non-reserved

+

SUBLIST

+

-

+

Non-reserved

+

-

+

SUBSTRING

+

Non-reserved (excluding functions and types)

+

Non-reserved

+

Reserved

+

SUM

+

-

+

Non-reserved

+

Reserved

+

SUPERUSER

+

Non-reserved

+

-

+

-

+

SYMMETRIC

+

Reserved

+

Non-reserved

+

-

+

SYNONYM

+

Non-reserved

+

-

+

-

+

SYS_REFCURSOR

+

Non-reserved

+

-

+

-

+

SYSDATE

+

Reserved

+

-

+

-

+

SYSID

+

Non-reserved

+

-

+

-

+

SYSTEM

+

Non-reserved

+

Non-reserved

+

-

+

SYSTEM_USER

+

-

+

Reserved

+

Reserved

+

TABLE

+

Reserved

+

Reserved

+

Reserved

+

TABLES

+

Non-reserved

+

-

+

-

+

TABLE_NAME

+

-

+

Non-reserved

+

Non-reserved

+

TEMP

+

Non-reserved

+

-

+

-

+

TEMPLATE

+

Non-reserved

+

-

+

-

+

TEMPORARY

+

Non-reserved

+

Reserved

+

Reserved

+

TERMINATE

+

-

+

Reserved

+

-

+

TEXT

+

Non-reserved

+

-

+

-

+

THAN

+

Non-reserved

+

Reserved

+

-

+

THEN

+

Reserved

+

Reserved

+

Reserved

+

TIME

+

Non-reserved (excluding functions and types)

+

Reserved

+

Reserved

+

TIMESTAMP

+

Non-reserved (excluding functions and types)

+

Reserved

+

Reserved

+

TIMESTAMPDIFF

+

Non-reserved (excluding functions and types)

+

-

+

-

+

TIMEZONE_HOUR

+

-

+

Reserved

+

Reserved

+

TIMEZONE_MINUTE

+

-

+

Reserved

+

Reserved

+

TINYINT

+

Non-reserved (excluding functions and types)

+

-

+

-

+

TO

+

Reserved

+

Reserved

+

Reserved

+

TRAILING

+

Reserved

+

Reserved

+

Reserved

+

TRANSACTION

+

Non-reserved

+

Reserved

+

Reserved

+

TRANSACTIONS_COMMITTED

+

-

+

Non-reserved

+

-

+

TRANSACTIONS_ROLLED_BACK

+

-

+

Non-reserved

+

-

+

TRANSACTION_ACTIVE

+

-

+

Non-reserved

+

-

+

TRANSFORM

+

-

+

Non-reserved

+

-

+

TRANSFORMS

+

-

+

Non-reserved

+

-

+

TRANSLATE

+

-

+

Non-reserved

+

Reserved

+

TRANSLATION

+

-

+

Reserved

+

Reserved

+

TREAT

+

Non-reserved (excluding functions and types)

+

Reserved

+

-

+

TRIGGER

+

Non-reserved

+

Reserved

+

-

+

TRIGGER_CATALOG

+

-

+

Non-reserved

+

-

+

TRIGGER_NAME

+

-

+

Non-reserved

+

-

+

TRIGGER_SCHEMA

+

-

+

Non-reserved

+

-

+

TRIM

+

Non-reserved (excluding functions and types)

+

Non-reserved

+

Reserved

+

TRUE

+

Reserved

+

Reserved

+

Reserved

+

TRUNCATE

+

Non-reserved

+

-

+

-

+

TRUSTED

+

Non-reserved

+

-

+

-

+

TSFIELD

+

Non-reserved

+

-

+

-

+

TSTAG

+

Non-reserved

+

-

+

-

+

TSTIME

+

Non-reserved

+

-

+

-

+

TYPE

+

Non-reserved

+

Non-reserved

+

Non-reserved

+

TYPES

+

Non-reserved

+

-

+

-

+

UESCAPE

+

-

+

-

+

-

+

UNBOUNDED

+

Non-reserved

+

-

+

-

+

UNCOMMITTED

+

Non-reserved

+

Non-reserved

+

Non-reserved

+

UNDER

+

-

+

Reserved

+

-

+

UNENCRYPTED

+

Non-reserved

+

-

+

-

+

UNION

+

Reserved

+

Reserved

+

Reserved

+

UNIQUE

+

Reserved

+

Reserved

+

Reserved

+

UNKNOWN

+

Non-reserved

+

Reserved

+

Reserved

+

UNLIMITED

+

Non-reserved

+

-

+

-

+

UNLISTEN

+

Non-reserved

+

-

+

-

+

UNLOCK

+

Non-reserved

+

-

+

-

+

UNLOGGED

+

Non-reserved

+

-

+

-

+

UNNAMED

+

-

+

Non-reserved

+

Non-reserved

+

UNNEST

+

-

+

Reserved

+

-

+

UNTIL

+

Non-reserved

+

-

+

-

+

UNUSABLE

+

Non-reserved

+

-

+

-

+

UPDATE

+

Non-reserved

+

Reserved

+

Reserved

+

UPPER

+

-

+

Non-reserved

+

Reserved

+

USAGE

+

-

+

Reserved

+

Reserved

+

USER

+

Reserved

+

Reserved

+

Reserved

+

USER_DEFINED_TYPE_CATALOG

+

-

+

Non-reserved

+

-

+

USER_DEFINED_TYPE_NAME

+

-

+

Non-reserved

+

-

+

USER_DEFINED_TYPE_SCHEMA

+

-

+

Non-reserved

+

-

+

USING

+

Reserved

+

Reserved

+

Reserved

+

VACUUM

+

Non-reserved

+

-

+

-

+

VALID

+

Non-reserved

+

-

+

-

+

VALIDATE

+

Non-reserved

+

-

+

-

+

VALIDATION

+

Non-reserved

+

-

+

-

+

VALIDATOR

+

Non-reserved

+

-

+

-

+

VALUE

+

Non-reserved

+

Reserved

+

Reserved

+

VALUES

+

Non-reserved (excluding functions and types)

+

Reserved

+

Reserved

+

VARCHAR

+

Non-reserved (excluding functions and types)

+

Reserved

+

Reserved

+

VARCHAR2

+

Non-reserved (excluding functions and types)

+

-

+

-

+

VARIABLE

+

-

+

Reserved

+

-

+

VARIADIC

+

Reserved

+

-

+

-

+

VARYING

+

Non-reserved

+

Reserved

+

Reserved

+

VERBOSE

+

Reserved (functions and types allowed)

+

-

+

-

+

VERSION

+

Non-reserved

+

-

+

-

+

VIEW

+

Non-reserved

+

Reserved

+

Reserved

+

VOLATILE

+

Non-reserved

+

-

+

-

+

WHEN

+

Reserved

+

Reserved

+

Reserved

+

WHENEVER

+

-

+

Reserved

+

Reserved

+

WHERE

+

Reserved

+

Reserved

+

Reserved

+

WHITESPACE

+

Non-reserved

+

-

+

-

+

WINDOW

+

Reserved

+

-

+

-

+

WITH

+

Reserved

+

Reserved

+

Reserved

+

WITHIN

+

Non-reserved

+

-

+

-

+

WITHOUT

+

Non-reserved

+

Reserved

+

-

+

WORK

+

Non-reserved

+

Reserved

+

Reserved

+

WORKLOAD

+

Non-reserved

+

-

+

-

+

WRAPPER

+

Non-reserved

+

-

+

-

+

WRITE

+

Non-reserved

+

Reserved

+

Reserved

+

XML

+

Non-reserved

+

-

+

-

+

XMLATTRIBUTES

+

Non-reserved (excluding functions and types)

+

-

+

-

+

XMLCONCAT

+

Non-reserved (excluding functions and types)

+

-

+

-

+

XMLELEMENT

+

Non-reserved (excluding functions and types)

+

-

+

-

+

XMLEXISTS

+

Non-reserved (excluding functions and types)

+

-

+

-

+

XMLFOREST

+

Non-reserved (excluding functions and types)

+

-

+

-

+

XMLPARSE

+

Non-reserved (excluding functions and types)

+

-

+

-

+

XMLPI

+

Non-reserved (excluding functions and types)

+

-

+

-

+

XMLROOT

+

Non-reserved (excluding functions and types)

+

-

+

-

+

XMLSERIALIZE

+

Non-reserved (excluding functions and types)

+

-

+

-

+

YEAR

+

Non-reserved

+

Reserved

+

Reserved

+

YES

+

Non-reserved

+

-

+

-

+

ZONE

+

Non-reserved

+

Reserved

+

Reserved

+
+ diff --git a/content/en/docs/Developerguide/lock-1.md b/content/en/docs/Developerguide/lock-1.md index 08cd8ac6c952b17a6cbbf70e09413faad65d0e36..4420c7132d9370939adc4af4d0bd04ffe5106885 100644 --- a/content/en/docs/Developerguide/lock-1.md +++ b/content/en/docs/Developerguide/lock-1.md @@ -222,7 +222,7 @@ LOCK [ TABLE ] {[ ONLY ] name [, ...]| {name [ * ]} [, ...]} - **ROW SHARE** - Conflicts with EXCLUSIVE and ACCESS EXCLUSIVE lock modes. + Allows concurrent read of a table but does not allow any other operations on the table. **SELECT FOR UPDATE** and **SELECT FOR SHARE** automatically acquire the **ROW SHARE** lock on the target table and add the **ACCESS SHARE** lock to other referenced tables except **FOR SHARE** and **FOR UPDATE**. diff --git a/content/en/docs/Developerguide/log-replay.md b/content/en/docs/Developerguide/log-replay.md index 388913c1d678c808ef6956647bfc19c1461b40ba..ee87f7081a4d718b39a0d06f4988a97b565f2957 100644 --- a/content/en/docs/Developerguide/log-replay.md +++ b/content/en/docs/Developerguide/log-replay.md @@ -20,7 +20,7 @@ This parameter is a POSTMASTER parameter. Set it based on instructions provided **Value range**: an integer ranging from 0 to 20 -**Default value**: **1** (it will be set to 4 by installation tool in default for better performance) +**Default value**: **1** ## recovery\_parse\_workers @@ -54,9 +54,7 @@ This parameter is a POSTMASTER parameter. Set it based on instructions provided **Value range**: an integer ranging from 1 to 2147483647 -This parameter is affected by the parameter: recovery_max_workers and parameter: recovery_parse_workers. When any of the above parameters is greater than 0, the parameter value will be recalculated. - -**Default value**: **1** +**Default value**: **4** ## enable\_page\_lsn\_check diff --git a/content/en/docs/Developerguide/logging-design-overview.md b/content/en/docs/Developerguide/logging-design-overview.md deleted file mode 100644 index ea8b0e1f61939ed72f1b6c4248cb52e5a2c951e0..0000000000000000000000000000000000000000 --- a/content/en/docs/Developerguide/logging-design-overview.md +++ /dev/null @@ -1,13 +0,0 @@ -# Logging Design Overview - -Write-Ahead Logging \(WAL\) is a standard method for ensuring data durability. WAL's central concept is that changes to data files \(where tables and indexes reside\) are only written after those changes have been logged, meaning after the log records that describe these changes have been flushed to permanent storage. - -The MOT Engine uses the existing openGauss logging facilities, enabling it also to participate in the replication process. - -**Figure 1** Three Logging Options -![](figures/图片1) - - - -The RedoLog component is used by both by backend threads that use the MOT Engine and by the WAL writer in order to persist their data. Checkpoints are performed using the Checkpoint Manager, which is triggered by the Postgres checkpointer. - diff --git a/content/en/docs/Developerguide/logical-decoding-by-sql-function-interfaces.md b/content/en/docs/Developerguide/logical-decoding-by-sql-function-interfaces.md new file mode 100644 index 0000000000000000000000000000000000000000..da397d2a02263a82b1e77e4a67518ffec57469d2 --- /dev/null +++ b/content/en/docs/Developerguide/logical-decoding-by-sql-function-interfaces.md @@ -0,0 +1,78 @@ +# Logical Decoding by SQL Function Interfaces + +In openGauss, you can call SQL functions to create, delete, and push logical replication slots, as well as obtain decoded transaction logs. + +## Prerequisites + +- Currently, logical logs are extracted from host nodes. Since SSL connections are disabled by default, to perform logical replication, set the GUC parameter **[ssl](en-us_topic_0242371486.md#en-us_topic_0237124696_en-us_topic_0059778664_s8c4647db116f44c4b9ce3dceee3d6ffa)** to **on** on host nodes. + + >![](public_sys-resources/icon-note.gif) **NOTE:** + >For security purposes, ensure that SSL connections are enabled. + + +- The GUC parameter **[wal\_level](en-us_topic_0242371497.md#en-us_topic_0237124707_en-us_topic_0059778393_s2c76f5957066407a959191148f2c780f)** is set to **logical**. +- The GUC parameter **[max\_replication\_slots](sending-server.md#section7322161612568)** is set to a value greater than the number of physical replication slots and logical replication slots required by each node. + + Physical replication slots provide an automatic method to ensure that Xlogs are not removed from a primary node before they are received by all the standby nodes and secondary nodes. That is, physical replication slots are used to support HA clusters. The number of physical replication slots required by a cluster is equal to the ratio of standby and secondary nodes to the primary node. For example, if an HA cluster has 1 primary node, 1 standby node, and 1 secondary node, the number of required physical replication slots will be 2. If an HA cluster has 1 primary node and 3 standby nodes, the number of required physical replication slots will be 3. + + Plan the number of logical replication slots as follows: + + - A logical replication slot can carry changes of only one database for decoding. If multiple databases are involved, create multiple logical replication slots. + - If logical replication is needed by multiple target databases, create multiple logical replication slots in the source database. Each logical replication slot corresponds to one logical replication link. + +- Only database administrators and users with the **REPLICATION** permission can perform operations in this scenario. + +## Procedure + +1. Log in to the primary node of the openGauss cluster as the cluster installation user. +2. Run the following command to connect to the default database **postgres**: + + ``` + gsql -d postgres -p 16000 -r + ``` + + In this command, **16000** is the database port number. It can be replaced by an actual port number. + +3. Create a logical replication slot named **slot1**. + + ``` + postgres=# SELECT * FROM pg_create_logical_replication_slot('slot1', 'mppdb_decoding'); + slotname | xlog_position + ----------+--------------- + slot1 | 0/601C150 + (1 row) + ``` + +4. Create a table **t** in the database and insert data into it. + + ``` + postgres=# CREATE TABLE t(a int PRIMARY KEY, b int); + postgres=# INSERT INTO t VALUES(3,3); + ``` + +5. Read the decoding result of **slot1**. The number of decoded records is 4096. + + ``` + postgres=# SELECT * FROM pg_logical_slot_peek_changes('slot1', NULL, 4096); + location | xid | data + -----------+-------+------------------------------------------------------------------------------------------------------------------------------------------------- + ------------------------------------------- + 0/601C188 | 1010023 | BEGIN 1010023 + 0/601ED60 | 1010023 | COMMIT 1010023 CSN 1010022 + 0/601ED60 | 1010024 | BEGIN 1010024 + 0/601ED60 | 1010024 | {"table_name":"public.t","op_type":"INSERT","columns_name":["a","b"],"columns_type":["integer","integer"],"columns_val":["3","3"],"old_keys_name":[],"old_keys_type":[],"old_keys_val":[]} + 0/601EED8 | 1010024 | COMMIT 1010024 CSN 1010023 + (5 rows) + ``` + +6. Delete the logical replication slot **slot1**. + + ``` + postgres=# SELECT * FROM pg_drop_replication_slot('slot1'); + pg_drop_replication_slot + -------------------------- + + (1 row) + ``` + + diff --git a/content/en/docs/Developerguide/logical-decoding.md b/content/en/docs/Developerguide/logical-decoding.md new file mode 100644 index 0000000000000000000000000000000000000000..061f37d4f43d4058bf3b37c2f3f9306673534551 --- /dev/null +++ b/content/en/docs/Developerguide/logical-decoding.md @@ -0,0 +1,7 @@ +# Logical Decoding + +- **[Overview](overview.md)** + +- **[Logical Decoding by SQL Function Interfaces](logical-decoding-by-sql-function-interfaces.md)** + + diff --git a/content/en/docs/Developerguide/logical-replication-functions.md b/content/en/docs/Developerguide/logical-replication-functions.md index b0abfed5f6cae57e57c7335673882d48243837bd..040b2257b7ca09ab5937e38bdd7b6e1eaa3321ef 100644 --- a/content/en/docs/Developerguide/logical-replication-functions.md +++ b/content/en/docs/Developerguide/logical-replication-functions.md @@ -16,7 +16,7 @@ Indicates the name of the plugin. - Value range: a string, supporting **mppdb\_decoding** and **test\_decoding**. + Value range: a string, supporting only **gaussdb\_decoding** Return type: name, text @@ -93,7 +93,7 @@ Return type: text, uint, text - + Note: The function returns the decoding result. Each decoding result contains three columns, corresponding to the above return types and indicating the LSN position, XID, and decoded content, respectively. - pg\_logical\_slot\_get\_changes\('slot\_name', 'LSN', upto\_nchanges, 'options\_name', 'options\_value'\) diff --git a/content/en/docs/Developerguide/logical-replication.md b/content/en/docs/Developerguide/logical-replication.md new file mode 100644 index 0000000000000000000000000000000000000000..68b13dd24e085b82f39d2097b95447f20c795bf7 --- /dev/null +++ b/content/en/docs/Developerguide/logical-replication.md @@ -0,0 +1,7 @@ +# Logical Replication + +- **[Logical Decoding](logical-decoding.md)** + +- **[Replicating Data Using the Logical Replication Tool](replicating-data-using-the-logical-replication-tool.md)** + + diff --git a/content/en/docs/Developerguide/mot-error-messages.md b/content/en/docs/Developerguide/mot-error-messages.md index 800d58d94e947b7974b3dff7193b1bc36cb4446b..caba01f921b884ce5ac7c2bbdce396d29c45aa2f 100644 --- a/content/en/docs/Developerguide/mot-error-messages.md +++ b/content/en/docs/Developerguide/mot-error-messages.md @@ -111,7 +111,8 @@ The PG code \(described below\) is returned internally by MOT to the database en

Success.

Denotes success

ERRCODE_SUCCESSFUL_COMPLETIONCOMPLETION

+

ERRCODE_SUCCESSFUL_

+

COMPLETION

RC_OK = 0

Cannot create table.

Cannot add column %s; as the number of declared columns exceeds the maximum declared columns.

ERRCODE_FEATURE_NOT_SUPPORTED

+

ERRCODE_FEATURE_NOT_

+

SUPPORTED

RC_TABLE_EXCEEDS_MAX_DECLARED_COLS

+

RC_TABLE_EXCEEDS_MAX_

+

DECLARED_COLS

Cannot create index.

Total column size is greater than maximum index size %u.

ERRCODE_FDW_KEY_SIZE_EXCEEDS_MAX_ALLOWED

+

ERRCODE_FDW_KEY_SIZE_

+

EXCEEDS_MAX_ALLOWED

RC_INDEX_EXCEEDS_MAX_SIZE

Cannot create index.

Total number of indexes for table %s is greater than the maximum number of indexes allowed %u.

ERRCODE_FDW_TOO_MANY_INDEXES

+

ERRCODE_FDW_TOO_MANY_

+

INDEXES

RC_TABLE_EXCEEDS_MAX_INDEXES

Cannot execute statement.

Maximum number of DDLs per transaction reached the maximum %u.

ERRCODE_FDW_TOO_MANY_DDL_CHANGES_IN_TRANSACTION_NOT_ALLOWED

+

ERRCODE_FDW_TOO_MANY_

+

DDL_CHANGES_IN_

+

TRANSACTION_NOT_

+

ALLOWED

RC_TXN_EXCEEDS_MAX_DDLS

ERRCODE_UNIQUE_VIOLATION

+

ERRCODE_UNIQUE_

+

VIOLATION

RC_UNIQUE_VIOLATION

<recovery message>

-

-
  

ERRCODE_CONFIG_FILE_ERROR

<recovery message>

-

-

ERRCODE_INVALID_TABLE_DEFINITION

+
  

ERRCODE_INVALID_TABLE_

+

DEFINITION

Memory engine – Failed to perform commit prepared.

-

-

ERRCODE_INVALID_TRANSACTION_STATE

+
  

ERRCODE_INVALID_TRANSACTION_

+

STATE

Invalid option <option name>

-

-

ERRCODE_FDW_INVALID_OPTION_NAME

+
  

ERRCODE_FDW_INVALID_OPTION_

+

NAME

Invalid memory allocation request size.

-

-

ERRCODE_INVALID_PARAMETER_VALUE

+
  

ERRCODE_INVALID_PARAMETER_

+

VALUE

Memory is temporarily unavailable.

-

-

ERRCODE_OUT_OF_LOGICAL_MEMORY

+
  

ERRCODE_OUT_OF_LOGICAL_

+

MEMORY

Could not serialize access due to concurrent update.

-

-

ERRCODE_T_R_SERIALIZATION_FAILURE

+
  

ERRCODE_T_R_SERIALIZATION_

+

FAILURE

Alter table operation is not supported for memory table.

Cannot create MOT tables while incremental checkpoint is enabled.

Re-index is not supported for memory tables.

-

-

ERRCODE_FDW_OPERATION_NOT_SUPPORTED

+
  

ERRCODE_FDW_OPERATION_NOT_

+

SUPPORTED

Allocation of table metadata failed.

-

-
  

ERRCODE_OUT_OF_MEMORY

Database with OID %u does not exist.

-

-
  

ERRCODE_UNDEFINED_DATABASE

Value exceeds maximum precision: %d.

-

-

ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE

+
  

ERRCODE_NUMERIC_VALUE_OUT_

+

OF_RANGE

You have reached a maximum logical capacity %lu of allowed %lu.

-

-

ERRCODE_OUT_OF_LOGICAL_MEMORY

+
  

ERRCODE_OUT_OF_LOGICAL_

+

MEMORY

- - - - - - - - - - - - - - - - - - - +

Isolation Level

-

Description

-

READ UNCOMMITTED

-

Not supported by MOT.

-

READ COMMITTED

-

Supported by MOT.

-

The READ COMMITTED isolation level that guarantees that any data that is read was already committed when it was read. It simply restricts the reader from seeing any intermediate, uncommitted or dirty reads. Data is free to be changed after it has been read so that READ COMMITTED does not guarantee that if the transaction re-issues the read, that the same data will be found.

-

SNAPSHOT

-

Not supported by MOT.

-

The SNAPSHOT isolation level makes the same guarantees as SERIALIZABLE, except that concurrent transactions can modify the data. Instead, it forces every reader to see its own version of the world (its own snapshot). This makes it very easy to program, plus it is very scalable, because it does not block concurrent updates. However, in many implementations this isolation level requires higher server resources.

-

REPEATABLE READ

-

Supported by MOT.

-

REPEATABLE READ is a higher isolation level that (in addition to the guarantees of the READ COMMITTED isolation level) guarantees that any data that is read cannot change. If a transaction reads the same data again, it will find the same previously read data in place, unchanged and available to be read.

-

Because of the optimistic model, concurrent transactions are not prevented from updating rows read by this transaction. Instead, at commit time this transaction validates that the REPEATABLE READ isolation level has not been violated. If it has, this transaction is rolled back and must be retried.

-

SERIALIZABLE

-

Not supported by MOT.

-

Serializable isolation makes an even stronger guarantee. In addition to everything that the REPEATABLE READ isolation level guarantees, it also guarantees that no new data can be seen by a subsequent read.

-

It is named SERIALIZABLE because the isolation is so strict that it is almost a bit like having the transactions run in series rather than concurrently.

-
+ + + + + + + + + + + + + + + + + + +

Isolation Level

+

Description

+

READ UNCOMMITTED

+

Not supported by MOT.

+

READ COMMITTED

+

Supported by MOT.

+

The READ COMMITTED isolation level that guarantees that any data that is read was already committed when it was read. It simply restricts the reader from seeing any intermediate, uncommitted or dirty reads. Data is free to be changed after it has been read so that READ COMMITTED does not guarantee that if the transaction re-issues the read, that the same data will be found.

+

SNAPSHOT

+

Not supported by MOT.

+

The SNAPSHOT isolation level makes the same guarantees as SERIALIZABLE, except that concurrent transactions can modify the data. Instead, it forces every reader to see its own version of the world (its own snapshot). This makes it very easy to program, plus it is very scalable, because it does not block concurrent updates. However, in many implementations this isolation level requires higher server resources.

+

REPEATABLE READ

+

Supported by MOT.

+

REPEATABLE READ is a higher isolation level that (in addition to the guarantees of the READ COMMITTED isolation level) guarantees that any data that is read cannot change. If a transaction reads the same data again, it will find the same previously read data in place, unchanged and available to be read.

+

Because of the optimistic model, concurrent transactions are not prevented from updating rows read by this transaction. Instead, at commit time this transaction validates that the REPEATABLE READ isolation level has not been violated. If it has, this transaction is rolled back and must be retried.

+

SERIALIZABLE

+

Not supported by MOT.

+

Serializable isolation makes an even stronger guarantee. In addition to everything that the REPEATABLE READ isolation level guarantees, it also guarantees that no new data can be seen by a subsequent read.

+

It is named SERIALIZABLE because the isolation is so strict that it is almost a bit like having the transactions run in series rather than concurrently.

+
+ The following table shows the concurrency side effects enabled by the different isolation levels. **Table 2** Concurrency Side Effects Enabled by Isolation Levels - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +

Isolation Level

-

Description

-

Non-repeatable Read

-

Phantom

-

READ UNCOMMITTED

-

Yes

-

Yes

-

Yes

-

READ COMMITTED

-

No

-

Yes

-

Yes

-

REPEATABLE READ

-

No

-

No

-

Yes

-

SNAPSHOT

-

No

-

No

-

No

-

SERIALIZABLE

-

No

-

No

-

No

-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Isolation Level

+

Description

+

Non-repeatable Read

+

Phantom

+

READ UNCOMMITTED

+

Yes

+

Yes

+

Yes

+

READ COMMITTED

+

No

+

Yes

+

Yes

+

REPEATABLE READ

+

No

+

No

+

Yes

+

SNAPSHOT

+

No

+

No

+

No

+

SERIALIZABLE

+

No

+

No

+

No

+
In the near future release, openGauss MOT will also support both SNAPSHOT and SERIALIZABLE isolation levels. diff --git a/content/en/docs/Developerguide/mot-local-and-global-memory.md b/content/en/docs/Developerguide/mot-local-and-global-memory.md index 09b4a3ace86db1af1859701d04bf20493375cd1d..ed667be5f77d5dfd029f606e96c5fe6998176f6e 100644 --- a/content/en/docs/Developerguide/mot-local-and-global-memory.md +++ b/content/en/docs/Developerguide/mot-local-and-global-memory.md @@ -10,9 +10,8 @@ When a transaction change is required, SILO handles the copying of all that tran The basic interactive transactional flow with our SILO-enhanced concurrency control is shown in the figure below – -**Figure 1** Private \(Local\) Memory \(for each transaction\) and a Global Memory \(for all the transactions of all the cores\) - -![](figures/private-(local)-memory-(for-each-transaction)-and-a-global-memory.png) +**Figure 1** Private \(Local\) Memory \(for each transaction\) and a Global Memory \(for all the transactions of all the cores\) +![](figures/private-(local)-memory-(for-each-transaction)-and-a-global-memory-(for-all-the-transactions-of-all-t.png "private-(local)-memory-(for-each-transaction)-and-a-global-memory-(for-all-the-transactions-of-all-t") For more details, refer to the Industrial-Strength OLTP Using Main Memory and Many-cores document\[[Comparison – Disk vs. MOT](comparison-disk-vs-mot.md)\]. diff --git a/content/en/docs/Developerguide/mot-logging-wal-redo-log-concepts.md b/content/en/docs/Developerguide/mot-logging-wal-redo-log-concepts.md index 24a6c49b8e34fcfa9f6f45f516cc32613dd11742..7bb264984b295d3c14612a59813eb72b0618b754 100644 --- a/content/en/docs/Developerguide/mot-logging-wal-redo-log-concepts.md +++ b/content/en/docs/Developerguide/mot-logging-wal-redo-log-concepts.md @@ -26,15 +26,168 @@ Two synchronous transaction logging options and one asynchronous transaction log According to your configuration, one of the following types of logging is implemented – -- [Synchronous Redo Logging](synchronous-redo-logging.md) -- [Group Synchronous Redo Logging](group-synchronous-redo-logging.md) -- [Asynchronous Redo Logging](asynchronous-redo-logging.md) +- **Synchronous Redo Logging** -### Additional inforamtion: + The **Synchronous Redo Logging** option is the simplest and most strict redo logger. When a transaction is committed by a client application, the transaction redo entries are recorded in the WAL \(Redo Log\), as follows – -- [Logging Design Overview](logging-design-overview.md) -- [Per-transaction Logging](per-transaction-logging.md) -- [Exception Handling](exception-handling.md) + 1. While a transaction is in progress, it is stored in the MOT’s memory. + 2. After a transaction finishes and the client application sends a** Commit **command, the transaction is locked and then written to the WAL Redo Log on the disk. This means that while the transaction log entries are being written to the log, the client application is still waiting for a response. + 3. As soon as the transaction's entire buffer is written to the log, the changes to the data in memory take place and then the transaction is committed. After the transaction has been committed, the client application is notified that the transaction is complete. + **Technical Description** + + When a transaction ends, the SynchronousRedoLogHandler serializes its transaction buffer and write it to the XLOG iLogger implementation. + + **Figure 1** Synchronous Logging + + + **Summary** + + The **Synchronous Redo Logging** option is the safest and most strict because it ensures total synchronization of the client application and the WAL Redo log entries for each transaction as it is committed; thus ensuring total durability and consistency with absolutely no data loss. This logging option prevents the situation where a client application might mark a transaction as successful, when it has not yet been persisted to disk. + + The downside of the **Synchronous Redo Logging** option is that it is the slowest logging mechanism of the three options. This is because a client application must wait until all data is written to disk and because of the frequent disk writes \(which typically slow down the database\). + +- **Group Synchronous Redo Logging** + + The **Group Synchronous Redo Logging** option is very similar to the **Synchronous Redo Logging** option, because it also ensures total durability with absolutely no data loss and total synchronization of the client application and the WAL \(Redo Log\) entries. The difference is that the **Group Synchronous Redo Logging** option writes _groups of transaction _redo entries to the WAL Redo Log on the disk at the same time, instead of writing each and every transaction as it is committed. Using Group Synchronous Redo Logging reduces the amount of disk I/Os and thus improves performance, especially when running a heavy workload. + + The MOT engine performs synchronous Group Commit logging with Non-Uniform Memory Access \(NUMA\)-awareness optimization by automatically grouping transactions according to the NUMA socket of the core on which the transaction is running. + + You may refer to the [NUMA Awareness Allocation and Affinity](numa-awareness-allocation-and-affinity.md) section for more information about NUMA-aware memory access. + + When a transaction commits, a group of entries are recorded in the WAL Redo Log, as follows – + + 1. While a transaction is in progress, it is stored in the memory. The MOT engine groups transactions in buckets according to the NUMA socket of the core on which the transaction is running. This means that all the transactions running on the same socket are grouped together and that multiple groups will be filling in parallel according to the core on which the transaction is running. + + Writing transactions to the WAL is more efficient in this manner because all the buffers from the same socket are written to disk together. + + >![](public_sys-resources/icon-note.gif) **NOTE:** + > + >- Each thread runs on a single core/CPU which belongs to a single socket and each thread only writes to the socket of the core on which it is running. + + 2. After a transaction finishes and the client application sends a Commit command, the transaction redo log entries are serialized together with other transactions that belong to the same group. + 3. After the configured criteria are fulfilled for a specific group of transactions \(quantity of committed transactions or timeout period as describes in the [REDO LOG \(MOT\)](mot-configuration-settings.md#section361563811235)section\), the transactions in this group are written to the WAL on the disk. This means that while these log entries are being written to the log, the client applications that issued the commit are waiting for a response. + 4. As soon as all the transaction buffers in the NUMA-aware group have been written to the log, all the transactions in the group are performing the necessary changes to the memory store and the clients are notified that these transactions are complete. + + **Technical Description** + + The four colors represent 4 NUMA nodes. Thus each NUMA node has its own memory log enabling a group commit of multiple connections. + + **Figure 2** Group Commit – with NUMA-awareness + + + **Summary** + + The **Group Synchronous Redo Logging** option is a an extremely safe and strict logging option because it ensures total synchronization of the client application and the WAL Redo log entries; thus ensuring total durability and consistency with absolutely no data loss. This logging option prevents the situation where a client application might mark a transaction as successful, when it has not yet been persisted to disk. + + On one hand this option has fewer disk writes than the **Synchronous Redo Logging** option, which may mean that it is faster. The downside is that transactions are locked for longer, meaning that they are locked until after all the transactions in the same NUMA memory have been written to the WAL Redo Log on the disk. + + The benefits of using this option depend on the type of transactional workload. For example, this option benefits systems that have many transactions \(and less so for systems that have few transactions, because there are few disk writes anyway\). + +- **Asynchronous Redo Logging** + + The **Asynchronous Redo Logging** option is the fastest logging method, However, it does not ensure no data loss, meaning that some data that is still in the buffer and was not yet written to disk may get lost upon a power failure or database crash. When a transaction is committed by a client application, the transaction redo entries are recorded in internal buffers and written to disk at preconfigured intervals. The client application does not wait for the data being written to disk. It continues to the next transaction. This is what makes asynchronous redo logging the fastest logging method. + + When a transaction is committed by a client application, the transaction redo entries are recorded in the WAL Redo Log, as follows – + + 1. While a transaction is in progress, it is stored in the MOT's memory. + 2. After a transaction finishes and the client application sends a Commit command, the transaction redo entries are written to internal buffers, but are not yet written to disk. Then changes to the MOT data memory take place and the client application is notified that the transaction is committed. + 3. At a preconfigured interval, a redo log thread running in the background collects all the buffered redo log entries and writes them to disk. + + **Technical Description** + + Upon transaction commit, the transaction buffer is moved \(pointer assignment – not a data copy\) to a centralized buffer and a new transaction buffer is allocated for the transaction. The transaction is released as soon as its buffer is moved to the centralized buffer and the transaction thread is not blocked. The actual write to the log uses the Postgres walwriter thread. When the walwriter timer elapses, it first calls the AsynchronousRedoLogHandler \(via registered callback\) to write its buffers and then continues with its logic and flushes the data to the XLOG. + + **Figure 3** Asynchronous Logging + + + **Summary** + + The Asynchronous Redo Logging option is the fastest logging option because it does not require the client application to wait for data being written to disk. In addition, it groups many transactions redo entries and writes them together, thus reducing the amount of disk I/Os that slow down the MOT engine. + + The downside of the Asynchronous Redo Logging option is that it does not ensure that data will not get lost upon a crash or failure. Data that was committed, but was not yet written to disk, is not durable on commit and thus cannot be recovered in case of a failure. The Asynchronous Redo Logging option is most relevant for applications that are willing to sacrifice data recovery \(consistency\) over performance. + + Logging Design Details + + The following describes the design details of each persistence-related component in the In-Memory Engine Module. + + **Figure 4** Three Logging Options + + + The RedoLog component is used by both by backend threads that use the In-Memory Engine and by the WAL writer in order to persist their data. Checkpoints are performed using the Checkpoint Manager, which is triggered by the Postgres checkpointer. + +- **Logging Design Overview** + + Write-Ahead Logging \(WAL\) is a standard method for ensuring data durability. WAL's central concept is that changes to data files \(where tables and indexes reside\) are only written after those changes have been logged, meaning after the log records that describe these changes have been flushed to permanent storage. + + In the In-Memory Engine we use the existing openGauss logging facilities and have not develop a low level logging API from scratch in order to reduce development time and to enable it to be used for replication purposes as well. + +- **Per-transaction Logging** + + In the In-Memory Engine, the transaction log records are stored in a transaction buffer which is part of the transaction object \(TXN\). The transaction buffer is logged during the calls to addToLog\(\) – if the buffer exceeds a threshold it is then flushed and reused. When a transaction commits and passes the validation phase \(OCC SILO\[[Comparison – Disk vs. MOT](comparison-disk-vs-mot.md)\] validation\) or aborts for some reason, the appropriate message is saved in the log as well in order to make it possible to determine the transaction's state during a recovery. + + **Figure 5** Per-transaction Logging + + + Parallel Logging is performed both by MOT and disk engines. However, the MOT engine enhances this design with a log-buffer per transaction, lockless preparation and a single log record. + +- **Exception Handling** + + The persistence module handles exceptions by using the Postgres error reporting infrastructure \(ereport\). An error message is recorded in the system log for each error condition. In addition, the error is reported to the envelope using Postgres’s built-in error reporting infrastructure. + + The following exceptions are reported by this module – + + **Table 1** Exception Handling + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Exception Condition

+

Exception Code

+

Scenario

+

Resulting Outcome

+

WAL write failure

+

ERRCODE_FDW_ERROR

+

On any case the WAL write fails

+

Transaction terminates

+

File IO error: write, open and so on

+

ERRCODE_IO_ERROR

+

Checkpoint – Called on any file access error

+

FATAL – process exists

+

Out of Memory

+

ERRCODE_INSUFFICIENT_RESOURCES

+

Checkpoint – Local memory allocation failures

+

FATAL – process exists

+

Logic, DB errors

+

ERRCODE_INTERNAL_

+

ERROR

+

Checkpoint: algorithm fails or failure to retrieve table data or indexes.

+

FATAL – process exists

+
diff --git a/content/en/docs/Developerguide/mot-low-latency.md b/content/en/docs/Developerguide/mot-low-latency.md index 6cc5cb57fb948f5b53626918b7c092ef7ce7d8a8..cf976caa5ddecdbb040761f90a9f9836e9af5e03 100644 --- a/content/en/docs/Developerguide/mot-low-latency.md +++ b/content/en/docs/Developerguide/mot-low-latency.md @@ -2,7 +2,8 @@ The following was measured on ARM/Kunpeng 2-socket server \(128 cores\). The numbers scale is milliseconds \(ms\). -**Figure 1** Low Latency \(90th%\) – Performance Benchmarks![](figures/low-latency-90th-performance-benchmarks.png) +**Figure 1** Low Latency \(90th%\) – Performance Benchmarks +![](figures/low-latency-90th-performance-benchmarks.png"low-latency-(90th-)-performance-benchmarks") MOT's average transaction speed is 2.5x, with MOT latency of 10.5 ms, compared to 23-25ms for disk tables. @@ -10,5 +11,5 @@ MOT's average transaction speed is 2.5x, with MOT latency of 10.5 ms, compared t >The average was calculated by taking into account all TPC-C 5 transaction percentage distributions. For more information, you may refer to the description of TPC-C transactions in the [MOT Sample TPC-C Benchmark](mot-sample-tpc-c-benchmark.md) section. **Figure 2** Low Latency \(90th%, Transaction Average\) – Performance Benchmarks -![](figures/low-latency-90th-transaction-average-performance-benchmarks.png) +![](figures/low-latency-90th-transaction-average-performance-benchmarks.png "low-latency-(90th-transaction-average)-performance-benchmarks") diff --git a/content/en/docs/Developerguide/mot-scale-up-architecture.md b/content/en/docs/Developerguide/mot-scale-up-architecture.md index cbc98e67a24927231a9d04108d0adca0bf31a52e..658cea5bd5bf7bc416f05582d04e7fdda3f4d86b 100644 --- a/content/en/docs/Developerguide/mot-scale-up-architecture.md +++ b/content/en/docs/Developerguide/mot-scale-up-architecture.md @@ -20,13 +20,13 @@ MOT has been designed to achieve the following – To achieve the requirements described above \(especially in an environment with many-cores\), our storage engine's architecture implements the following techniques and strategies – -- **Data and indexes only reside in memory**. -- **Data and indexes are not laid out with physical partitions** \(because these might achieve lower performance for certain types of applications\). -- Transaction concurrency control is based on **Optimistic Concurrency Control \(OCC\)** without any centralized contention points. See the [MOT Concurrency Control Mechanism](mot-concurrency-control-mechanism.md) section for more information about OCC. -- **Parallel Redo Logs \(ultimately per core\)** are used to efficiently avoid a central locking point. -- **Indexes are lock-free**. See the [MOT Indexes](mot-indexes.md) section for more information about lock-free indexes. -- **NUMA-awareness memory allocation** is used to avoid cross-socket access, especially for session lifecycle objects. See the [NUMA Awareness Allocation and Affinity](numa-awareness-allocation-and-affinity.md) section for more information about NUMA‑awareness. -- **A customized MOT memory management allocator** with pre-cached object pools is used to avoid expensive runtime allocation and extra points of contention. This dedicated MOT memory allocator makes memory allocation more efficient by pre‑accessing relatively large chunks of memory from the operation system as needed and then divvying it out to the MOT as needed. +- Data and indexes only reside in memory. +- Data and indexes are **not** laid out with physical partitions \(because these might achieve lower performance for certain types of applications\). +- Transaction concurrency control is based on Optimistic Concurrency Control \(OCC\) without any centralized contention points. See the [MOT Concurrency Control Mechanism](mot-concurrency-control-mechanism.md) section for more information about OCC. +- Parallel Redo Logs \(ultimately per core\) are used to efficiently avoid a central locking point. +- Indexes are lock-free. See the [MOT Indexes](mot-indexes.md) section for more information about lock-free indexes. +- NUMA-awareness memory allocation is used to avoid cross-socket access, especially for session lifecycle objects. See the [NUMA Awareness Allocation and Affinity](numa-awareness-allocation-and-affinity.md) section for more information about NUMA‑awareness. +- A customized MOT memory management allocator with pre-cached object pools is used to avoid expensive runtime allocation and extra points of contention. This dedicated MOT memory allocator makes memory allocation more efficient by pre‑accessing relatively large chunks of memory from the operation system as needed and then divvying it out to the MOT as needed. ## Integration using Foreign Data Wrappers \(FDW\) @@ -57,7 +57,7 @@ However, the original FDW mechanism in openGauss was not designed for storage en In order to support all the missing functionalities, the SQL layer and FDW interface layer were extended to provide the necessary infrastructure in order to enable the plugging in of the MOT transactional storage engine. -## Result – Linear Scale-up +## Result – Linear Scale-up The following shows the results achieved by the MOT design principles and implementation described above. @@ -68,16 +68,12 @@ openGauss and MOT have been tested on the following many-core systems with excel Our TPC-C benchmark dated June 2020 tested an openGauss MOT database on a Taishan 2480 server. A 4-socket ARM/Kunpeng server, achieved throughput of 4.8 M tpmC. The following graph shows the near-linear nature of the results, meaning that it shows a significant increase in performance correlating to the increase of the quantity of cores – **Figure 2** TPC-C on ARM \(256 Cores\) -![](figures/tpc-c-on-arm-(256-cores).png) - - +![](figures/tpc-c-on-arm-(256-cores).png "tpc-c-on-arm-(256-cores)") The following is an additional example that shows a test on an x86-based server also showing CPU utilization. **Figure 3** tpmC vs CPU Usage -![](figures/tpmc-vs-cpu-usage.png) - - +![](figures/tpmc-vs-cpu-usage.png "tpmc-vs-cpu-usage") The chart shows that MOT demonstrates a significant performance increase correlation with an increase of the quantity of cores. MOT consumes more and more of the CPU correlating to the increase of the quantity of cores. Other industry solutions do not increase and sometimes show slightly degraded performance, which is a well-known problem in the database industry that affects customers’ CAPEX and OPEX expenses and operational efficiency. diff --git a/content/en/docs/Developerguide/mysql_fdw.md b/content/en/docs/Developerguide/mysql_fdw.md new file mode 100644 index 0000000000000000000000000000000000000000..3866d35e2b90182ffb23f063c3a49420285fe6aa --- /dev/null +++ b/content/en/docs/Developerguide/mysql_fdw.md @@ -0,0 +1,59 @@ +# mysql\_fdw + +mysql\_fdw is an [open-source plug-in](https://github.com/EnterpriseDB/mysql_fdw). openGauss is developed and adapted based on the open-source [mysql\_fdw Release 2.5.3](https://github.com/EnterpriseDB/mysql_fdw/archive/REL-2_5_3.tar.gz). + +To compile and use mysql\_fdw, the MariaDB development packages must be included in the environment. Therefore, openGauss does not compile mysql\_fdw by default. The following describes how to compile and use mysql\_fdw. + +## Compiling mysql\_fdw + +To compile mysql\_fdw, install the development library and header file of MariaDB. You are advised to use the official MariaDB repositories. For details about how to select a repository, visit [http://downloads.mariadb.org/mariadb/repositories/](http://downloads.mariadb.org/mariadb/repositories). + +After the repository is configured, run the **yum install MariaDB-devel MariaDB-shared** command to install the related development libraries. In addition, **MariaDB-client** is a client tool of the MariaDB. You can install it as required to connect to the MariaDB for testing. + +After installing the development packages, start mysql\_fdw compilation. Add the **--enable-mysql-fdw** option when running the **configure** command. Perform compilation using the common openGauss compilation method. \(For details about openGauss compilation reference, see _Software Compilation and Installation_.\) + +After the compilation is complete, the **mysql\_fdw.so** file is generated in **lib/postgresql/** in the installation directory. SQL files and control files related to mysql\_fdw are stored in **share/postgresql/extension/** in the installation directory. + +If the **--enable-mysql-fdw** option is not added during compilation and installation, compile mysql\_fdw again after openGauss is installed, and then manually place the **mysql\_fdw.so** file to **lib/postgresql/** in the installation directory, and place **mysql\_fdw--1.0--1.1.sql**, **mysql\_fdw--1.1.sql**, and **mysql\_fdw.control** to **share/postgresql/extension/** in the installation directory. + +## Using mysql\_fdw + +- To use mysql\_fdw, install and connect to MariaDB or MySQL server. + +- Load the mysql\_fdw extension using **CREATE EXTENSION mysql\_fdw;**. + +- Create a server object using **CREATE SERVER**. + +- Create a user mapping using **CREATE USER MAPPING**. + +- Create a foreign table using **CREATE FOREIGN TABLE**. The structure of the foreign table must be the same as that of the MySQL or MariaDB table. The first column in the table on the MySQL or MariaDB must be unique, for example, **PRIMARY KEY** and **UNIQUE**. + +- Perform normal operations on the foreign table, such as **INSERT**, **UPDATE**, **DELETE**, **SELECT**, **EXPLAIN**, **ANALYZE** and **COPY**. + +- Drop a foreign table using **DROP FOREIGN TABLE**. + +- Drop a user mapping using **DROP USER MAPPING**. + +- Drop a server object using **DROP SERVER**. + +- Drop an extension using **DROP EXTENSION mysql\_fdw;**. + + +## Common Issues + +- When a foreign table is created on the openGauss, the table is not created on the MariaDB or MySQL server. You need to use the MariaDB or MySQL server client to connect to the MariaDB or MySQL server to create a table. + +- The MariaDB or MySQL server user used for creating **USER MAPPING** must have the permission to remotely connect to the MariaDB or MySQL server and perform operations on tables. Before using a foreign table, you can use the MariaDB or MySQL server client on the machine where the openGauss server is located and use the corresponding user name and password to check whether the MariaDB or MySQL server can be successfully connected and operations can be performed. + +- The **Can't initialize character set SQL\_ASCII \(path: compiled\_in\)** error occurs when the DML operation is performed on a foreign table. MariaDB does not support the **SQL\_ASCII** encoding format. Currently, this problem can be resolved only by modifying the encoding format of the openGauss database. Change the database encoding format to **update pg\_database set encoding = pg\_char\_to\_encoding\('UTF-8'\) where datname = 'postgres';**. Set **datname** based on the actual requirements. After the encoding format is changed, start a gsql session again so that mysql\_fdw can use the updated parameters. You can also use **--locale=LOCALE** when running **gs\_initdb** to set the default encoding format to non-SQL\_ASCII. + + +## Precautions + +- **SELECT JOIN** between two MySQL foreign tables cannot be pushed down to the MariaDB or MySQL server for execution. Instead, **SELECT JOIN** is divided into two SQL statements and transferred to the MariaDB or MySQL server for execution. Then the processing result is summarized in the openGauss. + +- The **IMPORT FOREIGN SCHEMA** syntax is not supported. + +- **CREATE TRIGGER** cannot be executed for foreign tables. + + diff --git a/content/en/docs/Developerguide/opengauss-transaction.md b/content/en/docs/Developerguide/opengauss-transaction.md index 9f5b8216bd5bab93d4c15be1fdcd27ff71226a6f..f800e871c12de5ad545d19908c2153302b8f1d82 100644 --- a/content/en/docs/Developerguide/opengauss-transaction.md +++ b/content/en/docs/Developerguide/opengauss-transaction.md @@ -114,7 +114,7 @@ This parameter is a USERSET parameter. Set it based on instructions provided in This parameter is a POSTMASTER parameter. Set it based on instructions provided in [Table 1](resetting-parameters.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). -You are advised not to modify this parameter. +This parameter is an internal parameter. Do not set it. **Value range**: 0 to 2 diff --git a/content/en/docs/Developerguide/oracle_fdw.md b/content/en/docs/Developerguide/oracle_fdw.md new file mode 100644 index 0000000000000000000000000000000000000000..f2318d1f612c7f064640adfb86a1d995d22f5154 --- /dev/null +++ b/content/en/docs/Developerguide/oracle_fdw.md @@ -0,0 +1,59 @@ +# oracle\_fdw + +oracle\_fdw is an [open-source plug-in](https://github.com/laurenz/oracle_fdw). openGauss is developed and adapted based on the open-source [oracle\_fdw Release 2.2.0](https://github.com/laurenz/oracle_fdw/archive/ORACLE_FDW_2_2_0.tar.gz). + +To compile and use oracle\_fdw, the Oracle development packages must be included in the environment. Therefore, openGauss does not compile oracle\_fdw by default. The following describes how to compile and use oracle\_fdw. + +## Compiling oracle\_fdw + +To compile oracle\_fdw, install the Oracle development library and header files from the [Oracle official website](https://www.oracle.com/database/technologies/instant-client/downloads.html). + +Select a proper running environment and version, download **Basic Package** and **SDK Package**, and install them. In addition, **SQLPlus Package** is a client tool of the Oracle server. You can install it as required to connect to the Oracle server for testing. + +After installing the development packages, start oracle\_fdw compilation. Add the **--enable-oracle-fdw** option when running the **configure** command. Perform compilation using the common openGauss compilation method. \(For details about openGauss compilation reference, see _Software Compilation and Installation_.\) + +After the compilation is complete, the **oracle\_fdw.so** file is generated in **lib/postgresql/** in the installation directory. SQL files and control files related to oracle\_fdw are stored in **share/postgresql/extension/** in the installation directory. + +If the **--enable-oracle-fdw** option is not added during compilation and installation, compile oracle\_fdw again after openGauss is installed, and then manually place the **oracle\_fdw.so** file to **lib/postgresql/** in the installation directory, and place **oracle\_fdw--1.0--1.1.sql**, **oracle\_fdw--1.1.sql**, and **oracle\_fdw.control** to **share/postgresql/extension/** in the installation directory. + +## Using oracle\_fdw + +- To use oracle\_fdw, install and connect to the Oracle server. + +- Load the oracle\_fdw extension using **CREATE EXTENSION oracle\_fdw;**. + +- Create a server object using **CREATE SERVER**. + +- Create a user mapping using **CREATE USER MAPPING**. + +- Create a foreign table using **CREATE FOREIGN TABLE**. The structure of the foreign table must be the same as that of the Oracle table. The first column in the table on the Oracle server must be unique, for example, **PRIMARY KEY** and **UNIQUE**. + +- Perform normal operations on the foreign table, such as **INSERT**, **UPDATE**, **DELETE**, **SELECT**, **EXPLAIN**, **ANALYZE** and **COPY**. + +- Drop a foreign table using **DROP FOREIGN TABLE**. + +- Drop a user mapping using **DROP USER MAPPING**. + +- Drop a server object using **DROP SERVER**. + +- Drop an extension using **DROP EXTENSION oracle\_fdw;**. + + +## Common Issues + +- When a foreign table is created on the openGauss, the table is not created on the Oracle server. You need to use the Oracle client to connect to the Oracle server to create a table. + +- The Oracle user used for executing **CREATE USER MAPPING** must have the permission to remotely connect to the Oracle server and perform operations on tables. Before using a foreign table, you can use the Oracle client on the machine where the openGauss server is located and use the corresponding user name and password to check whether the Oracle server can be successfully connected and operations can be performed. + +- When **CREATE EXTENSION oracle\_fdw;** is executed, the message **libclntsh.so: cannot open shared object file: No such file or directory** is displayed. The reason is that the Oracle development library **libclntsh.so** is not in the related path of the system. You can find the specific path of **libclntsh.so**, and then add the folder where the **libclntsh.so** file is located to **/etc/ld.so.conf**. For example, if the path of **libclntsh.so** is **/usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1**, add **/usr/lib/oracle/11.2/client64/lib/** to the end of **/etc/ld.so.conf**. Run the **ldconfig** command for the modification to take effect. Note that this operation requires the **root** permission. + + +## Precautions + +- **SELECT JOIN** between two Oracle foreign tables cannot be pushed down to the Oracle server for execution. Instead, **SELECT JOIN** is divided into two SQL statements and transferred to the Oracle server for execution. Then the processing result is summarized in the openGauss. + +- The **IMPORT FOREIGN SCHEMA** syntax is not supported. + +- **CREATE TRIGGER** cannot be executed for foreign tables. + + diff --git a/content/en/docs/Developerguide/overview.md b/content/en/docs/Developerguide/overview.md new file mode 100644 index 0000000000000000000000000000000000000000..f681e357531c9f47bb07b04e4b050036ad5f1b07 --- /dev/null +++ b/content/en/docs/Developerguide/overview.md @@ -0,0 +1,33 @@ +# Overview + +## Function + +The data replication capabilities supported by openGauss are as follows: + +Data is periodically synchronized to heterogeneous databases \(such as Oracle databases\) using a data migration tool. Real-time data replication is not supported. Therefore, the requirements for real-time data synchronization to heterogeneous databases are not satisfied. + +openGauss provides the logical decoding function to generate logical logs by decoding Xlogs. A target database parses logical logs to replicate data in real time. For details, see [Figure 1](#en-us_topic_0237121452_fig65787201989). Logical replication reduces the restrictions on target databases, allowing for data synchronization between heterogeneous databases and homogeneous databases with different forms. It allows data to be read and written during data synchronization on a target database, reducing the data synchronization latency. + +**Figure 1** Logical replication +![](figures/logical-replication.png "logical-replication") + +Logical replication consists of logical decoding and data replication. Logical decoding outputs logical logs by transaction. The database service or middleware parses the logical logs to implement data replication. Currently, openGauss supports only logical decoding. Therefore, this section involves only logical decoding. + +Logical decoding provides basic transaction decoding capabilities for logical replication. openGauss uses SQL functions for logical decoding. This method features easy function calling, requires no tools to obtain logical logs, and provides specific interfaces for interconnecting with external replay tools, saving the need of additional adaptation. + +Logical logs are output only after transactions are committed because they use transactions as the unit and logical decoding is driven by users. Therefore, to prevent Xlogs from being reclaimed by the system when transactions start and prevent required transaction information from being reclaimed by **VACUUM**, openGauss introduces logical replication slots to block Xlog reclaiming. + +A logical replication slot means a stream of changes that can be replayed in other clusters in the order they were generated in the original cluster. Each owner of logical logs maintains one logical replication slot. + +## Precautions + +- Decoding into DDL statements is not supported. +- Decoding for column-store data and data page replication is not supported. +- After a DDL statement \(for example, **ALTER TABLE**\) is executed, the physical logs that are not decoded before the DDL statement execution may be lost. +- Online cluster scale-out is not allowed during logical decoding. +- The size of a single tuple cannot exceed 1 GB, and decoding results may be larger than inserted data. Therefore, it is recommended that the size of a single tuple be less than or equal to 500 MB. +- Decoding compressed tables into DML statements is not supported. +- openGauss supports the following data types for decoding: **INTEGER**, **BIGINT**, **SMALLILNT**, **TINYINT**, **SERIAL**, **SMALLSERIAL**, **BIGSERIAL**, **FLOAT**, **DOUBLE PRECISION**, **DATE**, **TIME\[WITHOUT TIME ZONE\]**, **TIMESTAMP\[WITHOUT TIME ZONE\]**, **CHAR\(**_n_**\)**, **VARCHAR\(**_n_**\)**, and **TEXT**. +- Currently, SSL connections are not supported by default. If SSL connections are required, set the GUC parameter **ssl** to **on**. +- If JDBC is used to create a logical replication slot, the slot name must contain less than 64 characters, start with a letter or underscore \(\_\), and contain only one or more types of the following characters: letters \(a to z\), digits \(0-9\), and underscores \(\_\). + diff --git a/content/en/docs/Developerguide/per-transaction-logging.md b/content/en/docs/Developerguide/per-transaction-logging.md deleted file mode 100644 index a74309c9bfe78c6cdba3407b482f21e99d60c2ba..0000000000000000000000000000000000000000 --- a/content/en/docs/Developerguide/per-transaction-logging.md +++ /dev/null @@ -1,8 +0,0 @@ -# Per-transaction Logging - -In the In-Memory Engine, the transaction log records are stored in a transaction buffer which is part of the transaction object \(TXN\). The transaction buffer is logged during the calls to addToLog\(\) – if the buffer exceeds a threshold it is then flushed and reused. When a transaction commits and passes the validation phase \(OCC SILO\[[Comparison – Disk vs. MOT](comparison-disk-vs-mot.md)\] validation\) or aborts for some reason, the appropriate message is saved in the log as well in order to make it possible to determine the transaction's state during a recovery. - -**Figure 1** Per-transaction Logging![](figures/per-transaction-logging.png) - -Parallel Logging is performed both by MOT and disk engines. However, the MOT engine enhances this design with a log-buffer per transaction, lockless preparation and a single log record. - diff --git a/content/en/docs/Developerguide/postgres_fdw.md b/content/en/docs/Developerguide/postgres_fdw.md new file mode 100644 index 0000000000000000000000000000000000000000..095f8bd3d89fe7c77115b0a80b905d9411b1de39 --- /dev/null +++ b/content/en/docs/Developerguide/postgres_fdw.md @@ -0,0 +1,46 @@ +# postgres\_fdw + +postgres\_fdw is an open-source plug-in. Its code is released with the PostgreSQL source code. openGauss is developed and adapted based on the open-source postgres\_fdw source code \([https://ftp.postgresql.org/pub/source/v9.4.26/postgresql-9.4.26.tar.gz](https://ftp.postgresql.org/pub/source/v9.4.26/postgresql-9.4.26.tar.gz)\) in PostgreSQL 9.4.26. + +The postgres\_fdw plug-in is involved in compilation by default. After installing openGauss using the installation package, you can directly use postgres\_fdw without performing other operations. + +>![](public_sys-resources/icon-note.gif) **NOTE:** +>Currently, postgres\_fdw supports only connection between openGauss databases. + +## Using postgres\_fdw + +- Load the postgres\_fdw extension using **CREATE EXTENSION postgres\_fdw;**. + +- Create a server object using **CREATE SERVER**. + +- Create a user mapping using **CREATE USER MAPPING**. + +- Create a foreign table using **CREATE FOREIGN TABLE**. The structure of the foreign table must be the same as that of the remote openGauss table. + +- Perform normal operations on the foreign table, such as **INSERT**, **UPDATE**, **DELETE**, **SELECT**, **EXPLAIN**, **ANALYZE** and **COPY**. + +- Drop a foreign table using **DROP FOREIGN TABLE**. + +- Drop a user mapping using **DROP USER MAPPING**. + +- Drop a server object using **DROP SERVER**. + +- Drop an extension using **DROP EXTENSION postgres\_fdw;**. + + +## Common Issues + +- When a foreign table is created on the openGauss, the table is not created on the remote openGauss database. You need to use the Oracle client to connect to the remote openGauss database to create a table. + +- The openGauss user used for executing **CREATE USER MAPPING** must have the permission to remotely connect to the openGauss database and perform operations on tables. Before using a foreign table, you can use the gsql client on the local machine and use the corresponding user name and password to check whether the remote openGauss database can be successfully connected and operations can be performed. + + +## Precautions + +- **SELECT JOIN** between two postgres\_fdw foreign tables cannot be pushed down to the remote openGauss database for execution. Instead, **SELECT JOIN** is divided into two SQL statements and transferred to the remote openGauss database for execution. Then the processing result is summarized locally. + +- The **IMPORT FOREIGN SCHEMA** syntax is not supported. + +- **CREATE TRIGGER** cannot be executed for foreign tables. + + diff --git a/content/en/docs/Developerguide/primary-server.md b/content/en/docs/Developerguide/primary-server.md index c3856b5693e46b436b4d1743de2c5cd1876627ba..187d189c6ff19cb77543de841bd47ecdd58486d9 100644 --- a/content/en/docs/Developerguide/primary-server.md +++ b/content/en/docs/Developerguide/primary-server.md @@ -48,10 +48,10 @@ This parameter is a SIGHUP parameter. Set it based on instructions provided in **Parameter description**: Specifies how WAL files and data are replicated between primary and standby servers, and between primary and secondary servers. -The default value of this parameter is **off** and cannot be modified. +This parameter is an INTERNAL parameter. Its default value is **off** and cannot be modified. >![](public_sys-resources/icon-notice.gif) **NOTICE:** ->This parameter cannot be modified in normal service scenarios. That is, the WAL file and data page mixed replication mode is disabled. +>This parameter is an INTERNAL parameter and cannot be modified in normal service scenarios. That is, the WAL file and data page mixed replication mode is disabled. **Value range**: Boolean diff --git a/content/en/docs/Developerguide/replicating-data-using-the-logical-replication-tool.md b/content/en/docs/Developerguide/replicating-data-using-the-logical-replication-tool.md new file mode 100644 index 0000000000000000000000000000000000000000..203ca9813c799d27b1e8e36c345cc5c869cb1002 --- /dev/null +++ b/content/en/docs/Developerguide/replicating-data-using-the-logical-replication-tool.md @@ -0,0 +1,4 @@ +# Replicating Data Using the Logical Replication Tool + +Currently, the SDR and DRS tools support GaussDB logical replication. The replication tool extracts logical logs from GaussDB and plays them back to the peer database. + diff --git a/content/en/docs/Developerguide/sending-server.md b/content/en/docs/Developerguide/sending-server.md index 36bbf3a19c274c8a91a6402e40a3e0a245b1ed4c..76f0d9cd9d22ef4d193df23552000476ee4f2d8b 100644 --- a/content/en/docs/Developerguide/sending-server.md +++ b/content/en/docs/Developerguide/sending-server.md @@ -1,115 +1,168 @@ -# Sending Server - -## max\_wal\_senders - -**Parameter description**: Specifies the maximum number of simultaneously running WAL sender processes. The value cannot be greater than or equal to that of **[max\_connections](connection-settings.md#en-us_topic_0237124695_en-us_topic_0059777636_sa723b719fa70453bb7ec27f323d41c79)**. - -This parameter is a POSTMASTER parameter. Set it based on instructions provided in [Table 1](resetting-parameters.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). - ->![](public_sys-resources/icon-notice.gif) **NOTICE:** ->**[wal\_level](settings.md#en-us_topic_0237124707_en-us_topic_0059778393_s2c76f5957066407a959191148f2c780f)** must be set to **archive** or **hot\_standby** to allow the connection from standby servers. - -**Value range**: an integer ranging from 0 to 262143 - -**Default value**: **4** for a single-server system and **8** for a primary/standby environment - -## wal\_keep\_segments - -**Parameter description**: Specifies the number of Xlog file segments. Specifies the minimum number of transaction log files stored in the **pg\_xlog** directory. The standby server obtains log files from the primary server for streaming replication. - -This parameter is a SIGHUP parameter. Set it based on instructions provided in [Table 1](resetting-parameters.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). - -**Value range**: an integer ranging from 2 to _INT\_MAX_ - -**Default value**: **65** - -**Setting suggestions**: - -- During WAL archiving or recovery from a checkpoint on the server, the system may retain more log files than the number specified by **wal\_keep\_segments**. -- If this parameter is set to an excessively small value, a transaction log may have been overwritten by a new transaction before requested by the standby server. As a result, the request fails and the connection between the primary and standby servers is terminated. -- If the HA system uses asynchronous transmission, increase the value of **wal\_keep\_segments** when data greater than 4 GB is continuously imported in COPY mode. Take T6000 board as an example. If the data to be imported reaches 50 GB, you are advised to set this parameter to **1000**. You can dynamically restore the setting of this parameter after data import is complete and the WAL synchronization is proper. - -## wal\_sender\_timeout - -**Parameter description**: Specifies the maximum duration that the sending server waits for the WAL reception in the receiver. - -This parameter is a SIGHUP parameter. Set it based on instructions provided in [Table 1](resetting-parameters.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). - ->![](public_sys-resources/icon-notice.gif) **NOTICE:** ->- If the data volume on the primary server is huge, the value of this parameter must be increased for the database rebuilding on a standby server. For example, if the data volume on the primary server reaches 500 GB, you are advised to set this parameter to 600 seconds. ->- This parameter cannot be set to a value larger than the value of **wal\_receiver\_timeout** or the timeout parameter for database rebuilding. - -**Value range**: an integer ranging from 0 to _INT\_MAX_. The unit is ms. - -**Default value**: **6s** - -## replconninfo1 - -**Parameter description**: Specifies the information about the first node to be listened to and authenticated by the current server. - -This parameter is a SIGHUP parameter. Set it based on instructions provided in [Table 1](resetting-parameters.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). - -**Value range**: a string. An empty string indicates that no information about the first node is configured. - -**Default value**: empty - -## replconninfo2 - -**Parameter description**: Specifies the information about the second node to be listened to and authenticated by the current server. - -This parameter is a SIGHUP parameter. Set it based on instructions provided in [Table 1](resetting-parameters.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). - -**Value range**: a string. An empty string indicates that no information about the second node is configured. - -**Default value**: empty - -## replconninfo3 - -**Parameter description**: Specifies the information about the third node to be listened to and authenticated by the current server. - -This parameter is a SIGHUP parameter. Set it based on instructions provided in [Table 1](resetting-parameters.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). - -**Value range**: a string. An empty string indicates that no information about the third node is configured. - -**Default value**: empty - -## replconninfo4 - -**Parameter description**: Specifies the information about the fourth node to be listened to and authenticated by the current server. - -This parameter is a SIGHUP parameter. Set it based on instructions provided in [Table 1](resetting-parameters.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). - -**Value range**: a string. An empty string indicates that no information about the fourth node is configured. - -**Default value**: empty - -## replconninfo5 - -**Parameter description**: Specifies the information about the fifth node to be listened to and authenticated by the current server. - -This parameter is a SIGHUP parameter. Set it based on instructions provided in [Table 1](resetting-parameters.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). - -**Value range**: a string. An empty string indicates that no information about the fifth node is configured. - -**Default value**: empty - -## replconninfo6 - -**Parameter description**: Specifies the information about the sixth node to be listened to and authenticated by the current server. - -This parameter is a SIGHUP parameter. Set it based on instructions provided in [Table 1](resetting-parameters.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). - -**Value range**: a string. An empty string indicates that no information about the sixth node is configured. - -**Default value**: empty - -## replconninfo7 - -**Parameter description**: Specifies the information about the seventh node to be listened to and authenticated by the current server. - -This parameter is a SIGHUP parameter. Set it based on instructions provided in [Table 1](resetting-parameters.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). - -**Value range**: a string. An empty string indicates that no information about the seventh node is configured. - -**Default value**: empty - +# Sending Server + +## max\_wal\_senders + +**Parameter description**: Specifies the maximum number of simultaneously running WAL sender processes. The value cannot be greater than or equal to that of **[max\_connections](en-us_topic_0242371485.md#en-us_topic_0237124695_en-us_topic_0059777636_sa723b719fa70453bb7ec27f323d41c79)**. + +This parameter is a POSTMASTER parameter. Set it based on instructions provided in [Table 1](en-us_topic_0242370406.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). + +>![](public_sys-resources/icon-notice.gif) **NOTICE:** +>**[wal\_level](en-us_topic_0242371497.md#en-us_topic_0237124707_en-us_topic_0059778393_s2c76f5957066407a959191148f2c780f)** must be set to **archive** or **hot\_standby** to allow the connection from standby servers. + +**Value range**: an integer ranging from 0 to 262143 + +**Default value**: **4** for a single-server system and **8** for a primary/standby environment + +## wal\_keep\_segments + +**Parameter description**: Specifies the number of Xlog file segments. Specifies the minimum number of transaction log files stored in the **pg\_xlog** directory. The standby server obtains log files from the primary server for streaming replication. + +This parameter is a SIGHUP parameter. Set it based on instructions provided in [Table 1](en-us_topic_0242370406.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). + +**Value range**: an integer ranging from 2 to _INT\_MAX_ + +**Default value**: **65** + +**Setting suggestions**: + +- During WAL archiving or recovery from a checkpoint on the server, the system may retain more log files than the number specified by **wal\_keep\_segments**. +- If this parameter is set to an excessively small value, a transaction log may have been overwritten by a new transaction before requested by the standby server. As a result, the request fails and the connection between the primary and standby servers is terminated. +- If the HA system uses asynchronous transmission, increase the value of **wal\_keep\_segments** when data greater than 4 GB is continuously imported in COPY mode. Take T6000 board as an example. If the data to be imported reaches 50 GB, you are advised to set this parameter to **1000**. You can dynamically restore the setting of this parameter after data import is complete and the WAL synchronization is proper. + +## wal\_sender\_timeout + +**Parameter description**: Specifies the maximum duration that the sending server waits for the WAL reception in the receiver. + +This parameter is a SIGHUP parameter. Set it based on instructions provided in [Table 1](en-us_topic_0242370406.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). + +>![](public_sys-resources/icon-notice.gif) **NOTICE:** +>- If the data volume on the primary server is huge, the value of this parameter must be increased for the database rebuilding on a standby server. For example, if the data volume on the primary server reaches 500 GB, you are advised to set this parameter to 600 seconds. +>- This parameter cannot be set to a value larger than the value of **wal\_receiver\_timeout** or the timeout parameter for database rebuilding. + +**Value range**: an integer ranging from 0 to _INT\_MAX_. The unit is ms. + +**Default value**: **6s** + +## max\_replication\_slots + +**Parameter description**: Specifies the number of log replication slots in the primary server. + +This parameter is a POSTMASTER parameter. Set it based on instructions provided in [Table 1](en-us_topic_0242370406.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). + +**Value range**: an integer ranging from 8 to 100 + +**Default value**: **8** + +**Setting suggestions**: + +When using logical replication, you are advised to set this parameter to: Number of current physical replication slots + Number of required logical replication slots. + +- Physical replication slots provide an automatic method to ensure that Xlogs are not removed from a primary node before they are received by all the standby nodes and secondary nodes. That is, physical replication slots are used to support HA clusters. The number of physical replication slots required by a cluster is equal to the ratio of standby and secondary nodes to the primary node. For example, if an HA cluster has 1 primary node, 1 standby node, and 1 secondary node, the number of required physical replication slots will be 2. If an HA cluster has 1 primary node and 3 standby nodes, the number of required physical replication slots will be 3. +- Plan the number of logical replication slots as follows: + - A logical replication slot can carry changes of only one database for decoding. If multiple databases are involved, create multiple logical replication slots. + - If logical replication is needed by multiple target databases, create multiple logical replication slots in the source database. Each logical replication slot corresponds to one logical replication link. + + +## enable\_slot\_log + +**Parameter description**: Specifies whether to enable primary/standby synchronization for logical replication slots. + +This parameter is a USERSET parameter. Set it based on instructions provided in [Table 1](en-us_topic_0242370406.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). + +**Value range**: Boolean + +- **on** indicates that primary/standby synchronization is enabled for logical replication slots. +- **off** indicates that primary/standby synchronization is disabled for logical replication slots. + +**Default value**: **off** + +## max\_changes\_in\_memory + +**Parameter description**: Specifies the maximum size \(bytes\) of a single transaction buffered in the memory during logical decoding. + +This parameter is a POSTMASTER parameter. Set it based on instructions provided in [Table 1](en-us_topic_0242370406.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). + +**Value range**: an integer ranging from 1 to 2147483647 + +**Default value**: **4096** + +## max\_cached\_tuplebufs + +**Parameter description**: Specifies the maximum size \(bytes\) of the total tuple information buffered in the memory during logic decoding. You are advised to set this parameter to a value greater than or equal to twice of [max\_changes\_in\_memory](#section16366164213497). + +This parameter is a POSTMASTER parameter. Set it based on instructions provided in [Table 1](en-us_topic_0242370406.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). + +**Value range**: an integer ranging from 1 to 2147483647 + +**Default value**: **8192** + +## replconninfo1 + +**Parameter description**: Specifies the information about the first node to be listened to and authenticated by the current server. + +This parameter is a SIGHUP parameter. Set it based on instructions provided in [Table 1](en-us_topic_0242370406.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). + +**Value range**: a string. An empty string indicates that no information about the first node is configured. + +**Default value**: empty + +## replconninfo2 + +**Parameter description**: Specifies the information about the second node to be listened to and authenticated by the current server. + +This parameter is a SIGHUP parameter. Set it based on instructions provided in [Table 1](en-us_topic_0242370406.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). + +**Value range**: a string. An empty string indicates that no information about the second node is configured. + +**Default value**: empty + +## replconninfo3 + +**Parameter description**: Specifies the information about the third node to be listened to and authenticated by the current server. + +This parameter is a SIGHUP parameter. Set it based on instructions provided in [Table 1](en-us_topic_0242370406.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). + +**Value range**: a string. An empty string indicates that no information about the third node is configured. + +**Default value**: empty + +## replconninfo4 + +**Parameter description**: Specifies the information about the fourth node to be listened to and authenticated by the current server. + +This parameter is a SIGHUP parameter. Set it based on instructions provided in [Table 1](en-us_topic_0242370406.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). + +**Value range**: a string. An empty string indicates that no information about the fourth node is configured. + +**Default value**: empty + +## replconninfo5 + +**Parameter description**: Specifies the information about the fifth node to be listened to and authenticated by the current server. + +This parameter is a SIGHUP parameter. Set it based on instructions provided in [Table 1](en-us_topic_0242370406.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). + +**Value range**: a string. An empty string indicates that no information about the fifth node is configured. + +**Default value**: empty + +## replconninfo6 + +**Parameter description**: Specifies the information about the sixth node to be listened to and authenticated by the current server. + +This parameter is a SIGHUP parameter. Set it based on instructions provided in [Table 1](en-us_topic_0242370406.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). + +**Value range**: a string. An empty string indicates that no information about the sixth node is configured. + +**Default value**: empty + +## replconninfo7 + +**Parameter description**: Specifies the information about the seventh node to be listened to and authenticated by the current server. + +This parameter is a SIGHUP parameter. Set it based on instructions provided in [Table 1](en-us_topic_0242370406.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). + +**Value range**: a string. An empty string indicates that no information about the seventh node is configured. + +**Default value**: empty + diff --git a/content/en/docs/Developerguide/set.md b/content/en/docs/Developerguide/set.md index f2445683b47010c52393b427bec07cea3da4a86b..6fb7ec4f694a038dd1f0347e35e64352c988278b 100644 --- a/content/en/docs/Developerguide/set.md +++ b/content/en/docs/Developerguide/set.md @@ -71,7 +71,7 @@ Most run-time parameters can be modified by executing **SET**. Some parameters Specifies the current schema. - Value range: an existing schema name. If the schema name does not exist, it will cause the CURRENT_SCHEMA value to be empty. + Value range: an existing schema name - **SCHEMA schema** diff --git a/content/en/docs/Developerguide/statistics-information-functions.md b/content/en/docs/Developerguide/statistics-information-functions.md index b771f24a2d45f3b93f75d4a0f093bf96252fab0d..d6c009cad626b46430a301281025c6b71f5d8042 100644 --- a/content/en/docs/Developerguide/statistics-information-functions.md +++ b/content/en/docs/Developerguide/statistics-information-functions.md @@ -1,2958 +1,1478 @@ -# Statistics Information Functions - -Statistics information functions are divided into the following two categories: functions that access databases, using the OID of each table or index in a database to mark the database for which statistics are generated; functions that access servers, identified by the server process ID, whose value ranges from 1 to the number of currently active servers. - -- pg\_stat\_get\_db\_conflict\_tablespace\(oid\) - - Description: Number of queries canceled due to a conflict between the restored tablespace and the deleted tablespace in the database. - - Return type: bigint - -- pg\_control\_group\_config - - Description: Prints cgroup configurations on the current node. - - Return type: record - -- pg\_stat\_get\_db\_stat\_reset\_time\(oid\) - - Description: Last time when database statistics were reset. It is initialized to the system time during the first connection to each database. The reset time is updated when you call **pg\_stat\_reset** on the database and execute **pg\_stat\_reset\_single\_table\_counters** against any table or index in it. - - Return type: timestamptz - -- pg\_stat\_get\_function\_total\_time\(oid\) - - Description: Total wall clock time spent in the function, in microseconds. The time spent on this function call is included. - - Return type: bigint - -- pg\_stat\_get\_xact\_tuples\_returned\(oid\) - - Description: Number of rows read through sequential scans when the parameter is a table in the current transaction, or number of index entries returned when the parameter is an index. - - Return type: bigint - -- pg\_stat\_get\_xact\_numscans\(oid\) - - Description: Number of sequential scans performed when the parameter is a table in the current transaction, or number of index scans performed when the parameter is an index. - - Return type: bigint - -- pg\_stat\_get\_xact\_blocks\_fetched\(oid\) - - Description: Number of disk block fetch requests for a table or index in the current transaction. - - Return type: bigint - -- pg\_stat\_get\_xact\_blocks\_hit\(oid\) - - Description: Number of disk block fetch requests for tables or indexes found in cache in the current transaction. - - Return type: bigint - -- pg\_stat\_get\_xact\_function\_calls\(oid\) - - Description: Number of times the function is called in the current transaction. - - Return type: bigint - -- pg\_stat\_get\_xact\_function\_self\_time\(oid\) - - Description: Time spent in this function in the current transaction, excluding the time spent in calling the function. - - Return type: bigint - -- pg\_stat\_get\_xact\_function\_total\_time\(oid\) - - Description: Total wall clock time \(in microseconds\) spent in the function in the current transaction, including the time spent on the function call. - - Return type: - -- pg\_stat\_get\_wal\_senders\(\) - - Description: Queries walsender information on the primary server. - - Return type: setofrecord - - The following table describes return fields. - - **Table 1** Return field description - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Field

-

Type

-

Description

-

pid

-

bigint

-

Thread ID of the WAL sender

-

sender_pid

-

integer

-

Lightweight thread ID of the WAL sender.

-

local_role

-

text

-

Type of the primary node

-

peer_role

-

text

-

Type of the standby node

-

peer_state

-

text

-

Status of the standby node

-

state

-

text

-

Status of the WAL sender

-

catchup_start

-

timestamp with time zone

-

Startup time of a catchup task

-

catchup_end

-

timestamp with time zone

-

End time of a catchup task

-

sender_sent_location

-

text

-

Sending position of the primary node

-

sender_write_location

-

text

-

Writing position of the primary node

-

sender_flush_location

-

text

-

Flushing position of the primary node

-

sender_replay_location

-

text

-

Redo position of the primary node

-

receiver_received_location

-

text

-

Receiving position of the standby node

-

receiver_write_location

-

text

-

Writing position of the standby node

-

receiver_flush_location

-

text

-

Flushing position of the standby node

-

receiver_replay_location

-

text

-

Redo position of the standby node

-

sync_percent

-

text

-

Synchronization percentage

-

sync_state

-

text

-

Synchronization status

-

sync_priority

-

text

-

Priority of synchronous replication

-

sync_most_available

-

text

-

Maximum availability mode

-

channel

-

text

-

Channel information of the WAL sender

-
- -- pg\_stat\_get\_stream\_replications\(\) - - Description: Queries the primary/standby replication status. - - Return type: setofrecord - - The following table describes return values. - - **Table 2** Return value description - - - - - - - - - - - - - - - - - - - - - - - - -

Return Parameter

-

Type

-

Description

-

local_role

-

text

-

Local role

-

static_connections

-

integer

-

Connection statistics

-

db_state

-

text

-

Database status

-

detail_information

-

text

-

Detailed information

-
- -- pg\_stat\_get\_db\_numbackends\(oid\) - - Description: Number of active server processes for a database - - Return type: integer - -- pg\_stat\_get\_db\_xact\_commit\(oid\) - - Description: Number of transactions committed in a database - - Return type: bigint - -- pg\_stat\_get\_db\_xact\_rollback\(oid\) - - Description: Number of transactions rolled back in a database - - Return type: bigint - -- pg\_stat\_get\_db\_blocks\_fetched\(oid\) - - Description: Number of disk blocks fetch requests for a database - - Return type: bigint - -- pg\_stat\_get\_db\_blocks\_hit\(oid\) - - Description: Number of disk block fetch requests found in cache for a database - - Return type: bigint - -- pg\_stat\_get\_db\_tuples\_returned\(oid\) - - Description: Number of tuples returned for a database - - Return type: bigint - -- pg\_stat\_get\_db\_tuples\_fetched\(oid\) - - Description: Number of tuples fetched for a database - - Return type: bigint - -- pg\_stat\_get\_db\_tuples\_inserted\(oid\) - - Description: Number of tuples inserted in a database - - Return type: bigint - -- pg\_stat\_get\_db\_tuples\_updated\(oid\) - - Description: Number of tuples updated in a database - - Return type: bigint - -- pg\_stat\_get\_db\_tuples\_deleted\(oid\) - - Description: Number of tuples deleted in a database - - Return type: bigint - -- pg\_stat\_get\_db\_conflict\_lock\(oid\) - - Description: Number of lock conflicts in a database - - Return type: bigint - -- pg\_stat\_get\_db\_deadlocks\(oid\) - - Description: Number of deadlocks in a database - - Return type: bigint - -- pg\_stat\_get\_numscans\(oid\) - - Description: Number of sequential row scans done if parameters are in a table or number of index scans done if parameters are in an index - - Return type: bigint - -- pg\_stat\_get\_role\_name\(oid\) - - Description: Obtains the username based on the user OID. Only the sysadmin and monitor admin users can access. - - Return type: text - - Example: - - ``` - postgres=# select pg_stat_get_role_name(10); - pg_stat_get_role_name - ----------------------- - aabbcc - (1 row) - ``` - -- pg\_stat\_get\_tuples\_returned\(oid\) - - Description: Number of sequential row scans done if parameters are in a table or number of index entries returned if parameters are in an index - - Return type: bigint - -- pg\_stat\_get\_tuples\_fetched\(oid\) - - Description: Number of table rows fetched by bitmap scans if parameters are in a table, or table rows fetched by simple index scans using the index if parameters are in an index - - Return type: bigint - -- pg\_stat\_get\_tuples\_inserted\(oid\) - - Description: Number of rows inserted into table - - Return type: bigint - -- pg\_stat\_get\_tuples\_updated\(oid\) - - Description: Number of rows updated in table - - Return type: bigint - -- pg\_stat\_get\_tuples\_deleted\(oid\) - - Description: Number of rows deleted from table - - Return type: bigint - -- pg\_stat\_get\_tuples\_changed\(oid\) - - Description: Total number of inserted, updated, and deleted rows after the table was last analyzed or autoanalyzed - - Return type: bigint - -- pg\_stat\_get\_tuples\_hot\_updated\(oid\) - - Description: Number of rows HOT-updated in table - - Return type: bigint - -- pg\_stat\_get\_live\_tuples\(oid\) - - Description: Number of live rows in table - - Return type: bigint - -- pg\_stat\_get\_dead\_tuples\(oid\) - - Description: Number of dead rows in table - - Return type: bigint - -- pg\_stat\_get\_blocks\_fetched\(oid\) - - Description: Number of disk block fetch requests for table or index - - Return type: bigint - -- pg\_stat\_get\_blocks\_hit\(oid\) - - Description: Number of disk block requests found in cache for table or index - - Return type: bigint - -- pg\_stat\_get\_partition\_tuples\_inserted\(oid\) - - Description: Number of rows in the corresponding table partition - - Return type: bigint - -- pg\_stat\_get\_partition\_tuples\_updated\(oid\) - - Description: Number of rows that have been updated in the corresponding table partition - - Return type: bigint - -- pg\_stat\_get\_partition\_tuples\_deleted\(oid\) - - Description: Number of rows deleted from the corresponding table partition - - Return type: bigint - -- pg\_stat\_get\_partition\_tuples\_changed\(oid\) - - Description: Total number of inserted, updated, and deleted rows after the table partition was last analyzed or autoanalyzed - - Return type: bigint - -- pg\_stat\_get\_partition\_live\_tuples\(oid\) - - Description: Number of live rows in a table partition - - Return type: bigint - -- pg\_stat\_get\_partition\_dead\_tuples\(oid\) - - Description: Number of dead rows in a table partition - - Return type: bigint - -- pg\_stat\_get\_xact\_tuples\_inserted\(oid\) - - Description: Number of tuple inserted into the active subtransactions related to the table. - - Return type: bigint - -- pg\_stat\_get\_xact\_tuples\_deleted\(oid\) - - Description: Number of deleted tuples in the active subtransactions related to a table - - Return type: bigint - -- pg\_stat\_get\_xact\_tuples\_hot\_updated\(oid\) - - Description: Number of hot updated tuples in the active subtransactions related to a table - - Return type: bigint - -- pg\_stat\_get\_xact\_tuples\_updated\(oid\) - - Description: Number of updated tuples in the active subtransactions related to a table - - Return type: bigint - -- pg\_stat\_get\_xact\_partition\_tuples\_inserted\(oid\) - - Description: Number of inserted tuples in the active subtransactions related to a table partition - - Return type: bigint - -- pg\_stat\_get\_xact\_partition\_tuples\_deleted\(oid\) - - Description: Number of deleted tuples in the active subtransactions related to a table partition - - Return type: bigint - -- pg\_stat\_get\_xact\_partition\_tuples\_hot\_updated\(oid\) - - Description: Number of hot updated tuples in the active subtransactions related to a table partition - - Return type: bigint - -- pg\_stat\_get\_xact\_partition\_tuples\_updated\(oid\) - - Description: Number of updated tuples in the active subtransactions related to a table partition - - Return type: bigint - -- pg\_stat\_get\_last\_vacuum\_time\(oid\) - - Description: Last time when the autovacuum thread is manually started to clear a table - - Return type: timestamptz - -- pg\_stat\_get\_last\_autovacuum\_time\(oid\) - - Description: Time of the last vacuum initiated by the autovacuum daemon on this table - - Return type: timestamptz - -- pg\_stat\_get\_vacuum\_count\(oid\) - - Description: Number of times a table is manually cleared - - Return type: bigint - -- pg\_stat\_get\_autovacuum\_count\(oid\) - - Description: Number of times the autovacuum daemon is started to clear a table - - Return type: bigint - -- pg\_stat\_get\_last\_analyze\_time\(oid\) - - Description: Last time when a table starts to be analyzed manually or by the autovacuum thread - - Return type: timestamptz - -- pg\_stat\_get\_last\_autoanalyze\_time\(oid\) - - Description: Time of the last analysis initiated by the autovacuum daemon on this table - - Return type: timestamptz - -- pg\_stat\_get\_analyze\_count\(oid\) - - Description: Number of times a table is manually analyzed - - Return type: bigint - -- pg\_stat\_get\_autoanalyze\_count\(oid\) - - Description: Number of times the autovacuum daemon analyzes a table - - Return type: bigint - -- pg\_total\_autovac\_tuples\(bool,bool\) - - Description: Returns tuple records related to the total autovac, such as **nodename**, **nspname**, **relname**, and tuple IUDs. The input parameters specify whether to query **relation** and **local** information, respectively. - - Return type: setofrecord - - The following table describes return parameters. - - **Table 3** Return parameter description - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Return Parameter

-

Type

-

Description

-

nodename

-

name

-

Node name

-

nspname

-

name

-

Name of a namespace

-

relname

-

name

-

Name of an object, such as a table, index, or view

-

partname

-

name

-

Partition name

-

n_dead_tuples

-

bigint

-

Number of dead rows in a table partition

-

n_live_tuples

-

bigint

-

Number of live rows in a table partition

-

changes_since_analyze

-

bigint

-

Number of changes generated by ANALYZE

-
- -- pg\_autovac\_status\(oid\) - - Description: Returns autovac information, such as **nodename**, **nspname**, **relname**, **analyze**, **vacuum**, thresholds of **analyze** and **vacuum**, and the number of analyzed or vacuumed tuples. Only the sysadmin user can use this function. - - Return type: setofrecord - - The following table describes return parameters. - - **Table 4** Return parameter description - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Return Parameter

-

Type

-

Description

-

nspname

-

text

-

Name of a namespace

-

relname

-

text

-

Name of an object, such as a table, index, or view

-

nodename

-

text

-

Node name

-

doanalyze

-

Boolean

-

Whether to execute ANALYZE

-

anltuples

-

bigint

-

Number of ANALYZE tuples

-

anlthresh

-

bigint

-

ANALYZE threshold

-

dovacuum

-

Boolean

-

Whether to execute VACUUM

-

vactuples

-

bigint

-

Number of VACUUM tuples

-

vacthresh

-

bigint

-

VACUUM threshold

-
- -- pg\_autovac\_timeout\(oid\) - - Description: Returns the number of consecutive timeouts during the autovac operation on a table. If the table information is invalid or the node information is abnormal, **NULL** will be returned. - - Return type: bigint - -- pg\_autovac\_dbnode\(oid\) - - Description: Returns the name of the dbnode performing the autovac operation on a table. If the table information is invalid or the node information is abnormal, **NULL** will be returned. - - Return type: text - -- pg\_stat\_get\_last\_data\_changed\_time\(oid\) - - Description: Returns the time when **INSERT**, **UPDATE**, **DELETE**, or **EXCHANGE**/**TRUNCATE**/**DROP** **PARTITION** was performed last time on a table. The data in the **last\_data\_changed** column of the [PG\_STAT\_ALL\_TABLES](en-us_topic_0242385969.md) view is calculated by using this function. The performance of obtaining the last modification time by using the view is poor when the table has a large amount of data. In this case, you are advised to use the function. - - Return type: timestamptz - -- pg\_stat\_set\_last\_data\_changed\_time\(oid\) - - Description: Manually changes the time when **INSERT**, **UPDATE**, **DELETE**, or **EXCHANGE**/**TRUNCATE**/**DROP** **PARTITION** was performed last time. - - Return type: void - -- pg\_backend\_pid\(\) - - Description: Thread ID of the server thread attached to the current session - - Return type: integer - -- pg\_stat\_get\_activity\(integer\) - - Description: Returns a record about the backend with the specified PID. A record for each active backend in the system is returned if **NULL** is specified. The return results are a subnet of those \(excluding the **connection\_info** column\) in the [PG\_STAT\_ACTIVITY](en-us_topic_0242385966.md) view. - - Example: - - ``` - postgres=# select * from pg_stat_get_activity(140036483839744); - datid | pid | sessionid | usesysid | application_name | state | query | waiting | xact_start - | query_start | backend_start | state_change | client_addr | client_hostname | client_port | enqueue | query_i - d - -------+-----------------+-----------------+----------+------------------+--------+------------------------------------------------------+---------+------------------------ - -------+-------------------------------+-------------------------------+-------------------------------+-------------+-----------------+-------------+---------+------------ - ------- - 15914 | 140036483839744 | 140036483839744 | 10 | gsql | active | select * from pg_stat_get_activity(140036483839744); | f | 2020-06-24 10:53:19.583 - 666+08 | 2020-06-24 10:53:19.583598+08 | 2020-06-24 10:00:03.471893+08 | 2020-06-24 10:53:19.583601+08 | | | -1 | | 72902018968 - 108794 - (1 row) - ``` - - Return type: setofrecord - - The following table describes return parameters. - - **Table 5** Return parameter description - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Return Parameter

-

Type

-

Description

-

datid

-

oid

-

OID of the database that the user session connects to in the backend

-

pid

-

bigint

-

Thread ID of the backend

-

sessionid

-

bigint

-

Session ID

-

usesysid

-

oid

-

Name of the user logged in to the backend

-

application_name

-

text

-

Name of the application connected to the backend

-

state

-

text

-

Overall status of this backend.

-

query

-

text

-

Text of this backend's most recent query. If state is active, this column shows the ongoing query. In all other states, it shows the last query that was executed.

-

waiting

-

Boolean

-

Whether the backend is currently waiting on a lock. If yes, the value is true.

-

xact_start

-

timestamp with time zone

-

Time when current transaction was started (null if no transaction is active).

-

If the current query is the first of its transaction, the value of this column is the same as that of the query_start column.

-

query_start

-

timestamp with time zone

-

Time when the currently active query was started, or time when the last query was started if state is not active

-

backend_start

-

timestamp with time zone

-

Time when this process was started, that is, when the client connected to the server

-

state_change

-

timestamp with time zone

-

Time when the state was last changed

-

client_addr

-

inet

-

IP address of the client connected to the backend. If this column is NULL, it indicates either the client is connected via a Unix socket on the server or this is an internal process, such as AUTOVACUUM.

-

client_hostname

-

text

-

Host name of the connected client, as reported by a reverse DNS lookup of client_addr. This column will be non-null only for IP connections and only when log_hostname is enabled.

-

client_port

-

integer

-

TCP port number that the client uses for communication with this backend (-1 if a Unix socket is used)

-

enqueue

-

text

-

Unsupported currently

-

query_id

-

bigint

-

ID of a query

-
- -- pg\_stat\_get\_activity\_with\_conninfo\(integer\) - - Description: Returns a record about the backend with the specified PID. A record for each active backend in the system is returned if **NULL** is specified. The return results are a subnet of those in the [PG\_STAT\_ACTIVITY](en-us_topic_0242385966.md) view. - - Return type: setofrecord - - The following table describes return values. - - **Table 6** Return value description - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Return Value

-

Return Type

-

Description

-

datid

-

oid

-

OID of the database that the user session connects to in the backend

-

pid

-

bigint

-

Thread ID of the backend

-

sessionid

-

bigint

-

Session ID

-

usesysid

-

oid

-

Name of the user logged in to the backend

-

application_name

-

text

-

Name of the application connected to the backend

-

state

-

text

-

Overall status of this backend

-

query

-

text

-

Text of this backend's most recent query. If state is active, this column shows the ongoing query. In all other states, it shows the last query that was executed.

-

waiting

-

Boolean

-

Whether the backend is currently waiting on a lock. If yes, the value is true

-

xact_start

-

timestamp with time zone

-

Time when current transaction was started (null if no transaction is active). If the current query is the first of its transaction, the value of this column is the same as that of the query_start column.

-

query_start

-

timestamp with time zone

-

Time when the currently active query was started, or time when the last query was started if state is not active

-

backend_start

-

timestamp with time zone

-

Time when this process was started, that is, when the client connected to the server

-

state_change

-

timestamp with time zone

-

Time when the state was last changed

-

client_addr

-

inet

-

IP address of the client connected to the backend. If this column is NULL, it indicates either the client is connected via a Unix socket on the server or this is an internal process, such as AUTOVACUUM.

-

client_hostname

-

text

-

Host name of the connected client, as reported by a reverse DNS lookup of client_addr. This column will be non-null only for IP connections and only when log_hostname is enabled.

-

client_port

-

integer

-

TCP port number that the client uses for communication with this backend (-1 if a Unix socket is used)

-

enqueue

-

text

-

Unsupported currently

-

query_id

-

bigint

-

ID of a query

-

connection_info

-

text

-

A string in JSON format recording the driver type, driver version, driver deployment path, and process owner of the connected database

-
- -- pg\_user\_iostat\(text\) - - Description: Displays the I/O load management information about the job currently executed by the user. - - Return type: record - - The following table describes return fields. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Type

-

Description

-

userid

-

oid

-

User ID.

-

min_curr_iops

-

int4

-

Minimum I/O of the current user across database nodes. The IOPS is counted by ones for column storage and by ten thousands for row storage.

-

max_curr_iops

-

int4

-

Maximum I/O of the current user across database nodes. The IOPS is counted by ones for column storage and by thousands for row storage.

-

min_peak_iops

-

int4

-

Minimum peak I/O of the current user across database nodes. The IOPS is counted by ones for column storage and by thousands for row storage.

-

max_peak_iops

-

int4

-

Maximum peak I/O of the current user across database nodes. The IOPS is counted by ones for column storage and by thousands for row storage.

-

io_limits

-

int4

-

io_limits set for the resource pool specified by the user. The IOPS is counted by ones for column storage and by thousands for row storage.

-

io_priority

-

text

-

io_priority set for the user. The IOPS is counted by ones for column storage and by thousands for row storage.

-
- -- pg\_stat\_get\_function\_calls\(oid\) - - Description: Number of times the function has been called - - Return type: bigint - -- pg\_stat\_get\_function\_time\(oid\) - - Description: Total wall clock time spent in the function, in microseconds. Includes the time spent in functions called by this one. - - Return type: bigint - -- pg\_stat\_get\_function\_self\_time\(oid\) - - Description: Time spent in only this function. Time spent in called functions is excluded. - - Return type: bigint - -- pg\_stat\_get\_backend\_idset\(\) - - Description: Set of currently active server process numbers \(from 1 to the number of active server processes\) - - Return type: setofinteger - -- pg\_stat\_get\_backend\_pid\(integer\) - - Description: Thread ID of the given server thread - - Return type: bigint - -- pg\_stat\_get\_backend\_dbid\(integer\) - - Description: ID of the database connected to the given server process - - Return type: oid - -- pg\_stat\_get\_backend\_userid\(integer\) - - Description: User ID of the given server process - - Return type: oid - -- pg\_stat\_get\_backend\_activity\(integer\) - - Description: Active command of the given server process, but only if the current user is a system administrator or the same user as that of the session being queried and **track\_activities** is on - - Return type: text - -- pg\_stat\_get\_backend\_waiting\(integer\) - - Description: True if the given server process is waiting for a lock, but only if the current user is a system administrator or the same user as that of the session being queried and **track\_activities** is on - - Return type: Boolean - -- pg\_stat\_get\_backend\_activity\_start\(integer\) - - Description: The time at which the given server process's currently executing query was started, but only if the current user is a system administrator or the same user as that of the session being queried and **track\_activities** is on - - Return type: timestamp with time zone - -- pg\_stat\_get\_backend\_xact\_start\(integer\) - - Description: The time at which the given server process's currently executing transaction was started, but only if the current user is a system administrator or the same user as that of the session being queried and **track\_activities** is on - - Return type: timestamp with time zone - -- pg\_stat\_get\_backend\_start\(integer\) - - Description: The time at which the given server process was started, or **NULL** if the current user is neither a system administrator nor the same user as that of the session being queried - - Return type: timestamp with time zone - -- pg\_stat\_get\_backend\_client\_addr\(integer\) - - Description: IP address of the client connected to the given server process. If the connection is over a Unix domain socket, or if the current user is neither a system administrator nor the same user as that of the session being queried, **NULL** will be returned. - - Return type: inet - -- pg\_stat\_get\_backend\_client\_port\(integer\) - - Description: TCP port number of the client connected to the given server process If the connection is over a Unix domain socket, **–1** will be returned. If the current user is neither a system administrator nor the same user as that of the session being queried, **NULL** will be returned. - - Return type: integer - -- pg\_stat\_get\_bgwriter\_timed\_checkpoints\(\) - - Description: The number of times the background writer has started timed checkpoints \(because the **checkpoint\_timeout** time has expired\) - - Return type: bigint - -- pg\_stat\_get\_bgwriter\_requested\_checkpoints\(\) - - Description: The number of times the background writer has started checkpoints based on requests from the backend because **checkpoint\_segments** has been exceeded or the **CHECKPOINT** command has been executed - - Return type: bigint - -- pg\_stat\_get\_bgwriter\_buf\_written\_checkpoints\(\) - - Description: The number of buffers written by the background writer during checkpoints - - Return type: bigint - -- pg\_stat\_get\_bgwriter\_buf\_written\_clean\(\) - - Description: The number of buffers written by the background writer for routine cleaning of dirty pages - - Return type: bigint - -- pg\_stat\_get\_bgwriter\_maxwritten\_clean\(\) - - Description: The number of times the background writer has stopped its cleaning scan because it has written more buffers than specified in the **bgwriter\_lru\_maxpages** parameter - - Return type: bigint - -- pg\_stat\_get\_buf\_written\_backend\(\) - - Description: The number of buffers written by the backend because they needed to allocate a new buffer - - Return type: bigint - -- pg\_stat\_get\_buf\_alloc\(\) - - Description: The total number of buffer allocations - - Return type: bigint - -- pg\_stat\_clear\_snapshot\(\) - - Description: Discards the current statistics snapshot. - - Return type: void - -- pg\_stat\_reset\(\) - - Description: Resets all statistics counters for the current database to zero \(requires system administrator permissions\). - - Return type: void - -- gs\_stat\_reset\(\) - - Description: Resets all statistics counters for the current database on each node to zero \(requires system administrator permissions\). - - Return type: void - -- pg\_stat\_reset\_shared\(text\) - - Description: Resets all statistics counters for the current database in each node in a shared cluster to zero \(requires system administrator permissions\). - - Return type: void - -- pg\_stat\_reset\_single\_table\_counters\(oid\) - - Description: Resets statistics for a single table or index in the current database to zero \(requires system administrator permissions\). - - Return type: void - -- pg\_stat\_reset\_single\_function\_counters\(oid\) - - Description: Resets statistics for a single function in the current database to zero \(requires system administrator permissions\). - - Return type: void - -- pg\_stat\_session\_cu\(int, int, int\) - - Description: Obtains the compression unit \(CU\) hit statistics of sessions running on the current node. - - Return type: record - -- gs\_get\_stat\_session\_cu\(text, int, int, int\) - - Description: Obtains the CU hit statistics of all running sessions in openGauss. - - Return type: record - -- gs\_get\_stat\_db\_cu\(text, text, int, int, int\) - - Description: Obtains the CU hit statistics of a database in openGauss. - - Return type: record - -- pg\_stat\_get\_cu\_mem\_hit\(oid\) - - Description: Obtains the number of CU memory hits of a column storage table in the current database of the current node. - - Return type: bigint - -- pg\_stat\_get\_cu\_hdd\_sync\(oid\) - - Description: Obtains the times CU is synchronously read from a disk by a column storage table in the current database of the current node. - - Return type: bigint - -- pg\_stat\_get\_cu\_hdd\_asyn\(oid\) - - Description: Obtains the times CU is asynchronously read from a disk by a column storage table in the current database of the current node. - - Return type: bigint - -- pg\_stat\_get\_db\_cu\_mem\_hit\(oid\) - - Description: Obtains the CU memory hit in a database of the current node. - - Return type: bigint - -- pg\_stat\_get\_db\_cu\_hdd\_sync\(oid\) - - Description: Obtains the times CU is synchronously read from a disk by a database of the current node. - - Return type: bigint - -- pgxc\_get\_wlm\_current\_instance\_info\(text, int default null\) - - Description: Queries the current resource usage on the primary database node and reads the data that is not stored in section "5.19.2.3 GS\_WLM\_INSTANCE\_HISTORY" system catalog in the memory. The input parameters are the node name \(**ALL**, **C**, **D**, or _instance name_\) and the maximum number of records returned by each node. The returned value is **GS\_WLM\_INSTANCE\_HISTORY**. - - Return type: setofrecord - -- pgxc\_get\_wlm\_history\_instance\_info\(text, TIMESTAMP, TIMESTAMP, int default null\) - - Description: Queries the historical resource usage on the primary database node and reads the data in section "GS\_WLM\_INSTANCE\_HISTORY" system catalog in the memory. The input parameters are as follows: node name \(**ALL**, **C**, **D**, or _instance name_\), start time, end time, and maximum number of records returned for each instance. The returned value is **GS\_WLM\_INSTANCE\_HISTORY**. - - Return type: setofrecord - -- fenced\_udf\_process\(\) - - Description: Shows the number of local UDF Master and Work processes. - - Return type: record - -- total\_cpu\(\) - - Description: Obtains the CPU time used by the current node, in jiffies. - - Return type: bigint - -- total\_memory\(\) - - Description: Obtains the size of the virtual memory used by the current node, in KB. - - Return type: bigint - - -- pg\_stat\_get\_db\_cu\_hdd\_asyn\(oid\) - - Description: Obtains the times CU is asynchronously read from a disk by a database of the current node. - - Return type: bigint - - -- pg\_stat\_bad\_block\(text, int, int, int, int, int, timestamp with time zone, timestamp with time zone\) - - Description: Obtains damage information about pages or CUs after the current node is started. - - Example: select \* from pg\_stat\_bad\_block\(\); - - Return type: record - -- pg\_stat\_bad\_block\_clear\(\) - - Description: Deletes the page and CU damage information that is read and recorded on the node. \(System administrator rights are required.\) - - Return type: void - -- gs\_respool\_exception\_info\(pool text\) - - Description: Queries for the query rule of a specified resource pool. - - Return type: record - -- gs\_control\_group\_info\(pool text\) - - Description: Queries for information about Cgroups associated with a resource pool. - - Return type: record - - The following table describes return fields. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Attribute

-

Attribute Value

-

Description

-

name

-

class_a:workload_a1

-

Name of class and workload

-

class

-

class_a

-

Class Cgroup name

-

workload

-

workload_a1

-

Workload Cgroup name

-

type

-

DEFWD

-

Cgroup type (Top, CLASS, BAKWD, DEFWD, and TSWD)

-

gid

-

87

-

Cgroup ID

-

shares

-

30

-

Percentage of CPU resources to those on the parent node

-

limits

-

0

-

Percentage of CPU cores to those on the parent node

-

rate

-

0

-

Allocation raio in Timeshare

-

cpucores

-

0-3

-

CPU cores

-
- -- gs\_all\_control\_group\_info\(\) - - Description: Collects information about all Cgroups in the database. - - Return type: record - -- gs\_get\_control\_group\_info\(\) - - Description: Collects information about all Cgroups. - - Return type: record - -- get\_instr\_workload\_info\(integer\) - - Description: Obtains the transaction volume and time information on the primary database node. - - Return type: record - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Attribute

-

Attribute Value

-

Description

-

resourcepool_oid

-

10

-

OID of the resource pool (the logic is equivalent to the load)

-

commit_counter

-

4

-

Number of front-end transactions that were committed

-

rollback_counter

-

1

-

Number of front-end transactions that were rolled back

-

resp_min

-

949

-

Minimum response time of front-end transactions (unit: μs)

-

resp_max

-

201891

-

Maximum response time of front-end transactions (unit: μs)

-

resp_avg

-

43564

-

Average response time of front-end transactions (unit: μs)

-

resp_total

-

217822

-

Total response time of front-end transactions (unit: μs)

-

bg_commit_counter

-

910

-

Number of background transactions that were committed

-

bg_rollback_counter

-

0

-

Number of background transactions that were rolled back

-

bg_resp_min

-

97

-

Minimum response time of background transactions (unit: μs)

-

bg_resp_max

-

678080687

-

Maximum response time of background transactions (unit: μs)

-

bg_resp_avg

-

327847884

-

Average response time of background transactions (unit: μs)

-

bg_resp_total

-

298341575300

-

Total response time of background transactions (unit: μs)

-
- -- pv\_instance\_time\(\) - - Description: Obtains the time consumed in each execution phase on the current node. - - Return type: record - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Stat_name Attribute

-

Attribute Value

-

Description

-

DB_TIME

-

1062385

-

Total end-to-end wall time consumed by all threads (unit: μs)

-

CPU_TIME

-

311777

-

Total CPU time consumed by all threads (unit: μs)

-

EXECUTION_TIME

-

380037

-

Total time consumed on the executor (unit: μs)

-

PARSE_TIME

-

6033

-

Total time consumed for parsing SQL statements (unit: μs)

-

PLAN_TIME

-

173356

-

Total time consumed for generating an execution plan (unit: μs)

-

REWRITE_TIME

-

2274

-

Total time consumed on query rewriting (unit: μs)

-

PL_EXECUTION_TIME

-

0

-

Total time consumed for executing PL/SQL statements (unit: μs)

-

PL_COMPILATION_TIME

-

557

-

Total time consumed for SQL compilation (unit: μs)

-

NET_SEND_TIME

-

1673

-

Total time consumed for sending data over network (unit: μs)

-

DATA_IO_TIME

-

426622

-

Total time consumed for data read and write (unit: μs)

-
- -- DBE\_PERF.get\_global\_instance\_time\(\) - - Description: Provides the time consumption of each key phase of openGauss. This function is supported only on the primary node of the database. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- get\_instr\_unique\_sql\(\) - - Description: Obtains information about execution statements \(normalized SQL statements\) on the current node as a user with the **sysadmin** permission. - - Return type: record - -- reset\_unique\_sql\(text, text, bigint\) - - Description: Resets information about system execution statements \(normalized SQL statements\) information as a user with the **sysadmin** permission. The value of the first parameter can be** global** or **local**. **global** indicates that information on all nodes is cleared, and **local** indicates that only information on the current node is cleared. The value of the second parameter can be **ALL**, **BY\_USERID**, or **BY\_CNID**. **ALL** indicates that all information is cleared. **BY\_USERID** indicates that the SQL information of the user specified by **USERID** is cleared. **BY\_CNID** indicates that the SQL information related to the primary node of the database in the system is cleared. The third parameter indicates **CNID** and **USERID**. If the second parameter is set to **ALL**, the third parameter does not take effect and can be set to any value. - - Return type: Boolean - -- get\_instr\_wait\_event\(NULL\) - - Description: Obtains the statistics on wait events of the current node. - - Return type: record - -- get\_instr\_user\_login\(\) - - Description: Obtains the number of user login and logout times of the current node as a user with the **sysadmin** permission. - - Return type: record - -- get\_instr\_rt\_percentile\(\) - - Description: Obtains the response time distribution for 80% and 95% SQL statements in the CCN node. The unified cluster information of openGauss is stored on the CCN node. The query result from other nodes is **0**. - - Return type: record - -- get\_node\_stat\_reset\_time\(\) - - Description: Obtains statistics about reset \(restart, primary/standby switchover, and database deletion\) time of the current node. - - Return type: record - -- DBE\_PERF.get\_global\_os\_runtime\(\) - - Description: Displays the running status of the current OS. This function is supported only on the primary node of the database. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_os\_threads\(\) - - Description: Provides information about the threads under all normal nodes of openGauss. This function is supported only on the primary node of the database. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_summary\_workload\_sql\_count\(\) - - Description: Provides statistics about the number of SELECT, UPDATE, INSERT, DELETE, DDL, DML, and DCL statements of different service loads in openGauss. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_summary\_workload\_sql\_elapse\_time\(\) - - Description: Provides statistics about the number of SELECT, UPDATE, INSERT, and DELETE statements and response time information \(TOTAL, AVG, MIN, and MAX\) for different loads in openGauss. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_workload\_transaction\(\) - - Description: Obtains the transaction volume and time information on all nodes of openGauss. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_session\_stat\(\) - - Description: Obtains the session status information on all nodes of openGauss. To query this function, you must have the **sysadmin** permission. - - Return type: record - - >![](public_sys-resources/icon-note.gif) **NOTE:** - >The status information contains the following 17 items: **commit**, **rollback**, **sql**, **table\_scan**, **blocks\_fetched**, **physical\_read\_operation**, **shared\_blocks\_dirtied**, **local\_blocks\_dirtied**, **shared\_blocks\_read**, **local\_blocks\_read**, **blocks\_read\_time**, **blocks\_write\_time, sort\_imemory**, **sort\_idisk**, **cu\_mem\_hit**, **cu\_hdd\_sync\_read**, and **cu\_hdd\_asyread**. - -- DBE\_PERF.get\_global\_session\_time\(\) - - Description: Provides the time consumed in each key phase of each node in openGauss. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_session\_memory\(\) - - Description: Displays statistics about memory usage at the session level on each node in the unit of MB, including all the memory allocated to Postgres and stream threads on DNs for jobs currently executed by users. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_session\_memory\_detail\(\) - - Description: Displays statistics about thread memory usage on each node by MemoryContext node. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- gs\_session\_memory\_detail\_tp\(\) - - Description: Collects statistics about thread memory usage by MemoryContext node. When **enable\_thread\_pool** is set to **on**, this view contains memory usage of all threads and sessions. - - Return type: record - -- reate\_wlm\_operator\_info\(int flag\) - - Description: Clears top SQL operator-level statistics recorded in the current memory. If the input parameter is greater than 0, the information is archived to **gs\_wlm\_operator\_info** and **gs\_wlm\_ec\_operator\_info**. Otherwise, the information is not archived. Only the administrator can execute this function. - - Return type: int - -- create\_wlm\_session\_info\(int flag\) - - Description: Clears top SQL query statement-level statistics recorded in the current memory. If the input parameter is greater than 0, the information is archived to **gs\_wlm\_session\_query\_info\_all**. Otherwise, the information is not archived. Only the administrator can execute this function. - - Return type: int - -- pg\_stat\_get\_wlm\_session\_info\(int flag\) - - Description: Obtains top SQL query statement-level statistics recorded in the current memory. If the input parameter is not 0, the information is cleared from the memory. Only the system admin and monitor admin users can execute this function. - - Return type: record - -- gs\_wlm\_get\_resource\_pool\_info\(\) - - Description: Obtains the resource usage statistics of all users. - - Return type: record - -- gs\_wlm\_get\_all\_user\_resource\_info\(\) - - Description: Obtains the resource usage statistics of all users. - - Return type: record - -- gs\_wlm\_get\_user\_info\(\) - - Description: Obtains information about all users. - - Return type: record - -- gs\_wlm\_get\_workload\_records\(\) - - Description: Obtains all job information in dynamic load management. This function is valid only when dynamic load management is enabled. - - Return type: record - -- gs\_wlm\_persisitent\_user\_resource\_info\(\) - - Description: Archives all user resource usage statistics to the **gs\_wlm\_user\_resource\_history** system catalog. - - Return type: record - -- gs\_wlm\_readjust\_user\_space\(\) - - Description: Corrects the storage space usage of all users. Only the administrator can execute this function. - - Return type: record - -- gs\_wlm\_readjust\_user\_space\_through\_username\(text name\) - - Description: Corrects the storage space usage of a specified user. Common users can use this function to modify only their own usage. Only the administrator can modify the usage of all users. If the value of **name** is **0000**, the usage of all users needs to be modified. - - Return type: record - -- gs\_wlm\_readjust\_user\_space\_with\_reset\_flag\(text name, boolean isfirst\) - - Description: Corrects the storage space usage of a specified user. If the input parameter **isfirst** is set to **true**, statistics are collected from 0. Otherwise, statistics are collected from the previous result. Common users can use this function to modify only their own usage. Only the administrator can modify the usage of all users. If the value of **name** is **0000**, the usage of all users needs to be modified. - - Return type: record - -- gs\_wlm\_session\_respool\(\) - - Description: Obtains the session resource pool information about all background threads. - - Return type: record - -- gs\_wlm\_get\_session\_info\(\) - - Description: This API has been discarded and is unavailable currently. - -- gs\_wlm\_get\_user\_session\_info\(\) - - Description: This API has been discarded and is unavailable currently. - -- gs\_total\_nodegroup\_memory\_detail - - Description: Returns information about the memory used by the current logical cluster in the database, in MB. - - Return type: SETOF record - -- global\_comm\_client\_info\(\) - - Description: Queries information about active client connections of global nodes. For details about the columns returned by the function, see the **COMM\_CLIENT\_INFO** column. - - Return type: record - -- pgxc\_get\_wlm\_ec\_operator\_history\(\) - - Description: Displays the operator information when the execution of ExtensionConnector \(EC\) jobs cached on all primary nodes is complete. The information is cleared every 3 minutes. Only the system administrator can execute this function. - - Return type: record - -- pgxc\_get\_wlm\_ec\_operator\_info\(\) - - Description: Displays the operator information when the execution of ExtensionConnector \(EC\) jobs on all primary nodes is complete. Only the system administrator can execute this function. - - Return type: record - -- pgxc\_get\_wlm\_ec\_operator\_statistics\(\) - - Description: Displays the operator information when ExtensionConnector \(EC\) jobs on all primary nodes are being executed. Only the system administrator can execute this function. - - Return type: record - -- pgxc\_get\_wlm\_operator\_history\(\) - - Description: Displays the operator information when the execution of jobs cached on all primary nodes is complete. The information is cleared every 3 minutes. Only the system administrator can execute this function. - - Return type: record - -- pgxc\_get\_wlm\_operator\_info\(\) - - Description: Displays the operator information when the execution of jobs on all primary nodes is complete. Only the system administrator can execute this function. - - Return type: record - -- pgxc\_get\_wlm\_operator\_statistics\(\) - - Description: Displays the operator information when jobs on all primary nodes are being executed. Only the system administrator can execute this function. - - Return type: record - -- pgxc\_get\_wlm\_session\_history\(\) - - Description: Displays the load management information when the execution of jobs cached on all primary nodes is complete. The information is cleared every 3 minutes. Only the system administrator can execute this function. - - Return type: record - -- pgxc\_get\_wlm\_session\_info\(\) - - Description: Displays the load management information when the execution of jobs cached on all primary nodes is complete. Only the system administrator can execute this function. - - Return type: record - -- pgxc\_get\_wlm\_session\_info\_bytime\(tag text, begin timestamp, end timestamp, limit int\) - - Description: Displays load management records of jobs whose start or end time is within a time range on all primary nodes. Only the system administrator can execute this function. - - Parameter description: - - - **tag**: The value can only be **'start\_time'** or **'finish\_time'**, indicating that the query is restricted by the start time or end time of the job. - - **begin**: start time of a time range. - - **end**: end time of a time range. - - **limit**: number of returned records. - - Return type: record - - -- pgxc\_get\_wlm\_session\_statistics\(\) - - Description: Displays load management records when jobs on all primary nodes are being executed. Only the system administrator can execute this function. - - Return type: record - -- pgxc\_stat\_activity\_with\_conninfo\(\) - - Description: **PGXC\_STAT\_ACTIVITY** shows query information about the current user on all the CNs in the current cluster. Only the system administrator has the permission to query this view. - - Return type: SETOF record - -- pgxc\_wlm\_get\_workload\_records\(\) - - Description: Displays the status information when jobs on all primary nodes are being executed. Only the system administrator can execute this function. - - Return type: record - -- DBE\_PERF.get\_global\_active\_session\(\) - - Description: Displays a summary of samples in the **ACTIVE SESSION PROFILE** memory on all nodes. - - Return type: record - -- DBE\_PERF.get\_global\_session\_stat\_activity\(\) - - Description: Displays information about threads that are running on each node in openGauss. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_thread\_wait\_status\(\) - - Description: Displays the block waiting status of backend threads and auxiliary threads on all nodes. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_wlm\_user\_resource\_runtime\(\) - - Description: Displays the resource usage of all users. This parameter is valid only when **use\_workload\_manager** is set to **on**. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_operator\_history\_table\(\) - - Description: Displays the operator-related records \(persistent\) generated after jobs are executed on the primary database node of the current user. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_operator\_history\(\) - - Description: Displays the operator-related records generated after jobs are executed on the primary database node of the current user. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_operator\_runtime\(\) - - Description: Displays real-time operator-related records of jobs executed on the primary database node of the current user. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_statement\_complex\_history\(\) - - Description: Displays the historical records of complex queries on the primary database node of the current user. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_statement\_complex\_history\_table\(\) - - Description: Displays the historical records \(persistent\) of complex queries on the primary database node of the current user. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_statement\_complex\_runtime\(\) - - Description: Displays the real-time information of complex queries on the primary database node of the current user. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_memory\_node\_detail\(\) - - Description: Displays the memory usage of a certain database on all nodes. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_shared\_memory\_detail\(\) - - Description: Displays the usage information about all the shared memory contexts of all nodes. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_statio\_all\_indexes - - Description: Displays statistics about each index displayed in a row in the current database, showing I/O statistics about accesses to that specific index. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_local\_toastname\_and\_toastindexname\(\) - - Description: Provides the mapping between the name and index of the local TOAST table and its associated tables. - - Return type: record - -- DBE\_PERF.get\_summary\_statio\_all\_indexes\(\) - - Description: Collects statistics about each index displayed in a row in the current databases of all nodes and displays the I/O statistics of a specific index. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_statio\_all\_sequences\(\) - - Description: Provides I/O status information about all sequences in the namespace. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_statio\_all\_tables\(\) - - Description: Displays the I/O statistics about each table in databases on each node as a user with the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_summary\_statio\_all\_tables\(\) - - Description: Collects I/O statistics about each table in databases in openGauss. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_local\_toast\_relation\(\) - - Description: Provides the mapping between the name of the local toast table and its associated table. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_statio\_sys\_indexes\(\) - - Description: Displays the I/O status information about all system catalog indexes in namespaces on each node. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_summary\_statio\_sys\_indexes\(\) - - Description: Collects the I/O status information about all system catalog indexes in namespaces on each node. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_statio\_sys\_sequences\(\) - - Description: Provides the I/O status information about all the system sequences in the namespace. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_statio\_sys\_tables\(\) - - Description: Provides I/O status information about all system catalogs in namespaces on each node. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_summary\_statio\_sys\_tables\(\) - - Description: Displays the I/O status information of all system catalogs in the namespace in openGauss. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_statio\_user\_indexes\(\) - - Description: Displays the I/O status information about all user relationship table indexes in namespaces on each node. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_summary\_statio\_user\_indexes\(\) - - Description: Displays the I/O status information about all user relationship table indexes in namespaces in openGauss. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_statio\_user\_sequences\(\) - - Description: Displays the I/O status information about all user sequences in the namespace of each node. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_statio\_user\_tables\(\) - - Description: Displays the displays I/O status information about all user relationship tables in namespaces on each node. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_summary\_statio\_user\_tables\(\) - - Description: Displays the I/O status information about all user relationship tables in namespaces in openGauss. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_stat\_db\_cu\(\) - - Description: Queries CU hits in a database and in each node in openGauss. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_stat\_all\_indexes\(\) - - Description: Displays statistics of each index in databases on all nodes. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_summary\_stat\_all\_indexes\(\) - - Description: Collects statistics on each index in all databases on all nodes. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_stat\_sys\_tables\(\) - - Description: Displays statistics about the system catalogs of all the namespaces in **pg\_catalog** and **information\_schema** schemas on each node. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_summary\_stat\_sys\_tables\(\) - - Description: Collects statistics about the system catalogs of all the namespaces in **pg\_catalog** and **information\_schema** schemas on each node. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_stat\_sys\_indexes\(\) - - Description: Displays index status information about all the system catalogs in the **pg\_catalog** and **information\_schema** schemas on each node. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_summary\_stat\_sys\_indexes\(\) - - Description: Collects statistics about index status information about all the system catalogs in the **pg\_catalog** and **information\_schema** schemas on each node. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_stat\_user\_tables\(\) - - Description: Displays the status information about customized ordinary tables in all namespaces. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_summary\_stat\_user\_tables\(\) - - Description: Collects statistics about the status information about customized ordinary tables in all namespaces. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_stat\_user\_indexes\(\) - - Description: Displays the status information about the index of customized ordinary tables in all databases. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_summary\_stat\_user\_indexes\(\) - - Description: Collects statistics about the status information about the index of customized ordinary tables in all databases. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_stat\_database\(\) - - Description: Displays database statistics of all nodes. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_stat\_database\_conflicts\(\) - - Description: Collects statistics on the database of all nodes. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_stat\_xact\_all\_tables\(\) - - Description: Displays transaction status information about all ordinary tables and TOAST tables in all namespaces. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_summary\_stat\_xact\_all\_tables\(\) - - Description: Collects statistics about transaction status information about all ordinary tables and TOAST tables in all namespaces. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_stat\_xact\_sys\_tables\(\) - - Description: Displays transaction status information about all system catalogs in namespaces on all nodes. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_summary\_stat\_xact\_sys\_tables\(\) - - Description: Collects statistics about transaction status information about all system catalogs in namespaces on all nodes. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_stat\_xact\_user\_tables\(\) - - Description: Displays the transaction status information of the user tables in the namespaces on all nodes. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_summary\_stat\_xact\_user\_tables\(\) - - Description: Collects statistics about the transaction status information of the user tables in the namespaces on all nodes. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_stat\_user\_functions\(\) - - Description: Displays the transaction status information of customized functions in the namespaces on all nodes. To query the function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_stat\_xact\_user\_functions\(\) - - Description: Collects statistics about the transaction status information of customized functions in the namespaces on all nodes. To query the function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_stat\_bad\_block\(\) - - Description: Displays information about table and index read failures on all nodes. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_file\_redo\_iostat\(\) - - Description: Collects statistics on information about table and index read failures on all nodes. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_file\_iostat\(\) - - Description: Displays statistics about data file I/Os on all nodes. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_locks\(\) - - Description: Displays lock information of all nodes. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_replication\_slots\(\) - - Description: Displays logical replication information on all nodes. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_bgwriter\_stat\(\) - - Description: Displays statistics about the background writer process's activities on all nodes. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_replication\_stat\(\) - - Description: Displays information about log synchronization status on each node, such as the locations where the sender sends logs and where the receiver receives logs. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_transactions\_running\_xacts\(\) - - Description: Displays information about running transactions on each node. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_summary\_transactions\_running\_xacts\(\) - - Description: Collects statistics of information about running transactions on each node. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_transactions\_prepared\_xacts\(\) - - Description: Displays information about transactions that are currently prepared for two-phase commit on each node. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_summary\_transactions\_prepared\_xacts\(\) - - Description: Collects statistics information about transactions that are currently prepared for two-phase commit on each node. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_summary\_statement\(\) - - Description: Displays the status information of the historically-executed statements on each node. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_statement\_count\(\) - - Description: Displays the number of SELECT, UPDATE, INSERT, and DELETE statements and response time information \(TOTAL, AVG, MIN, and MAX\) on each node. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_config\_settings\(\) - - Description: Displays GUC parameter configuration information on each node. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_wait\_events\(\) - - Description: Displays the wait event status information on each node. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_statement\_responsetime\_percentile\(\) - - Description: Obtains the response time distribution for 80% and 95% SQL statements of openGauss. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_summary\_user\_login\(\) - - Description: Collects statistics about number of user login and logout times on each node in openGauss. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.get\_global\_record\_reset\_time\(\) - - Description: Displays the statistics about reset \(restart, primary/standby switchover, and database deletion\) time of openGauss. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- gs\_wlm\_user\_resource\_info\(name text\) - - Description: Queries for a user's resource quota and resource usage. - - Return type: record - -- pg\_stat\_get\_file\_stat\(\) - - Description: Rrecords statistics about data file I/Os to indicate I/O performance and detect performance problems such as abnormal I/O operations. - - Return type: record - -- pg\_stat\_get\_redo\_stat\(\) - - Description: Displays statistics on the replay of session thread logs. - - Return type: record - -- pg\_stat\_get\_status\(int8\) - - Description: Allows you to test the block waiting status about the backend thread and auxiliary thread of the current instance. - - Return type: record - -- get\_local\_rel\_iostat\(\) - - Description: Queries the accumulated I/O status of data files on the current node. - - Return type: record - -- DBE\_PERF.get\_global\_rel\_iostat\(\) - - Description: Displays statistics about data file I/Os on all nodes. To query this function, you must have the **sysadmin** permission. - - Return type: record - -- DBE\_PERF.global\_threadpool\_status\(\) - - Description: Displays the status of worker threads and sessions in thread pools on all nodes. For details about the columns returned by the function, see [GLOBAL\_THREADPOOL\_STATUS](en-us_topic_0245374746.md). - - Return type: record - -- remote\_ckpt\_stat\(\) - - Description: Displays the checkpoint information and log flushing information about all instances in the cluster \(except the current node\). - - Return type: record - - **Table 7** remote\_ckpt\_stat parameter description - - -

Parameter

+# Statistics Information Functions + +Statistics information functions are divided into the following two categories: functions that access databases, using the OID of each table or index in a database to mark the database for which statistics are generated; functions that access servers, identified by the server process ID, whose value ranges from 1 to the number of currently active servers. + +- pg\_stat\_get\_db\_numbackends\(oid\) + + Description: Number of active server processes for a database + + Return type: integer + +- pg\_stat\_get\_db\_xact\_commit\(oid\) + + Description: Number of transactions committed in a database + + Return type: bigint + +- pg\_stat\_get\_db\_xact\_rollback\(oid\) + + Description: Number of transactions rolled back in a database + + Return type: bigint + +- pg\_stat\_get\_db\_blocks\_fetched\(oid\) + + Description: Number of disk blocks fetch requests for a database + + Return type: bigint + +- pg\_stat\_get\_db\_blocks\_hit\(oid\) + + Description: Number of disk block fetch requests found in cache for a database + + Return type: bigint + +- pg\_stat\_get\_db\_tuples\_returned\(oid\) + + Description: Number of tuples returned for a database + + Return type: bigint + +- pg\_stat\_get\_db\_tuples\_fetched\(oid\) + + Description: Number of tuples fetched for a database + + Return type: bigint + +- pg\_stat\_get\_db\_tuples\_inserted\(oid\) + + Description: Number of tuples inserted in a database + + Return type: bigint + +- pg\_stat\_get\_db\_tuples\_updated\(oid\) + + Description: Number of tuples updated in a database + + Return type: bigint + +- pg\_stat\_get\_db\_tuples\_deleted\(oid\) + + Description: Number of tuples deleted in a database + + Return type: bigint + +- pg\_stat\_get\_db\_conflict\_lock\(oid\) + + Description: Number of lock conflicts in a database + + Return type: bigint + +- pg\_stat\_get\_db\_deadlocks\(oid\) + + Description: Number of deadlocks in a database + + Return type: bigint + +- pg\_stat\_get\_numscans\(oid\) + + Description: Number of sequential row scans done if parameters are in a table or number of index scans done if parameters are in an index + + Return type: bigint + +- pg\_stat\_get\_tuples\_returned\(oid\) + + Description: Number of sequential row scans done if parameters are in a table or number of index entries returned if parameters are in an index + + Return type: bigint + +- pg\_stat\_get\_tuples\_fetched\(oid\) + + Description: Number of table rows fetched by bitmap scans if parameters are in a table, or table rows fetched by simple index scans using the index if parameters are in an index + + Return type: bigint + +- pg\_stat\_get\_tuples\_inserted\(oid\) + + Description: Number of rows inserted into table + + Return type: bigint + +- pg\_stat\_get\_tuples\_updated\(oid\) + + Description: Number of rows updated in table + + Return type: bigint + +- pg\_stat\_get\_tuples\_deleted\(oid\) + + Description: Number of rows deleted from table + + Return type: bigint + +- pg\_stat\_get\_tuples\_changed\(oid\) + + Description: Total number of inserted, updated, and deleted rows after the table was last analyzed or autoanalyzed + + Return type: bigint + +- pg\_stat\_get\_tuples\_hot\_updated\(oid\) + + Description: Number of rows HOT-updated in table + + Return type: bigint + +- pg\_stat\_get\_live\_tuples\(oid\) + + Description: Number of live rows in table + + Return type: bigint + +- pg\_stat\_get\_dead\_tuples\(oid\) + + Description: Number of dead rows in table + + Return type: bigint + +- pg\_stat\_get\_blocks\_fetched\(oid\) + + Description: Number of disk block fetch requests for table or index + + Return type: bigint + +- pg\_stat\_get\_blocks\_hit\(oid\) + + Description: Number of disk block requests found in cache for table or index + + Return type: bigint + +- pg\_stat\_get\_partition\_tuples\_inserted\(oid\) + + Description: Number of rows in the corresponding table partition + + Return type: bigint + +- pg\_stat\_get\_partition\_tuples\_updated\(oid\) + + Description: Number of rows that have been updated in the corresponding table partition + + Return type: bigint + +- pg\_stat\_get\_partition\_tuples\_deleted\(oid\) + + Description: Number of rows deleted from the corresponding table partition + + Return type: bigint + +- pg\_stat\_get\_partition\_tuples\_changed\(oid\) + + Description: Total number of inserted, updated, and deleted rows after the table partition was last analyzed or autoanalyzed + + Return type: bigint + +- pg\_stat\_get\_partition\_live\_tuples\(oid\) + + Description: Number of live rows in a table partition + + Return type: bigint + +- pg\_stat\_get\_partition\_dead\_tuples\(oid\) + + Description: Number of dead rows in a table partition + + Return type: bigint + +- pg\_stat\_get\_xact\_tuples\_inserted\(oid\) + + Description: Number of tuple inserted into the active subtransactions related to the table. + + Return type: bigint + +- pg\_stat\_get\_xact\_tuples\_deleted\(oid\) + + Description: Number of deleted tuples in the active subtransactions related to a table + + Return type: bigint + +- pg\_stat\_get\_xact\_tuples\_hot\_updated\(oid\) + + Description: Number of hot updated tuples in the active subtransactions related to a table + + Return type: bigint + +- pg\_stat\_get\_xact\_tuples\_updated\(oid\) + + Description: Number of updated tuples in the active subtransactions related to a table + + Return type: bigint + +- pg\_stat\_get\_xact\_partition\_tuples\_inserted\(oid\) + + Description: Number of inserted tuples in the active subtransactions related to a table partition + + Return type: bigint + +- pg\_stat\_get\_xact\_partition\_tuples\_deleted\(oid\) + + Description: Number of deleted tuples in the active subtransactions related to a table partition + + Return type: bigint + +- pg\_stat\_get\_xact\_partition\_tuples\_hot\_updated\(oid\) + + Description: Number of hot updated tuples in the active subtransactions related to a table partition + + Return type: bigint + +- pg\_stat\_get\_xact\_partition\_tuples\_updated\(oid\) + + Description: Number of updated tuples in the active subtransactions related to a table partition + + Return type: bigint + +- pg\_stat\_get\_last\_vacuum\_time\(oid\) + + Description: Last time when the autovacuum thread is manually started to clear a table + + Return type: timestamptz + +- pg\_stat\_get\_last\_autovacuum\_time\(oid\) + + Description: Time of the last vacuum initiated by the autovacuum daemon on this table + + Return type: timestamptz + +- pg\_stat\_get\_vacuum\_count\(oid\) + + Description: Number of times a table is manually cleared + + Return type: bigint + +- pg\_stat\_get\_autovacuum\_count\(oid\) + + Description: Number of times the autovacuum daemon is started to clear a table + + Return type: bigint + +- pg\_stat\_get\_last\_analyze\_time\(oid\) + + Description: Last time when a table starts to be analyzed manually or by the autovacuum thread + + Return type: timestamptz + +- pg\_stat\_get\_last\_autoanalyze\_time\(oid\) + + Description: Time of the last analysis initiated by the autovacuum daemon on this table + + Return type: timestamptz + +- pg\_stat\_get\_analyze\_count\(oid\) + + Description: Number of times a table is manually analyzed + + Return type: bigint + +- pg\_stat\_get\_autoanalyze\_count\(oid\) + + Description: Number of times the autovacuum daemon analyzes a table + + Return type: bigint + +- pg\_total\_autovac\_tuples\(bool,bool\) + + Description: Returns tuple records related to the total autovac, such as **nodename**, **nspname**, **relname**, and tuple IUDs. The input parameters specify whether to query **relation** and **local** information, respectively. + + Return type: setofrecord + +- pg\_autovac\_status\(oid\) + + Description: Returns autovac information, such as **nodename**, **nspname**, **relname**, **analyze**, **vacuum**, thresholds of **analyze** and **vacuum**, and the number of analyzed or vacuumed tuples. + + Return type: setofrecord + +- pg\_autovac\_timeout\(oid\) + + Description: Returns the number of consecutive timeouts during the autovac operation on a table. If the table information is invalid or the node information is abnormal, **NULL** will be returned. + + Return type: bigint + +- pg\_autovac\_dbnode\(oid\) + + Description: Returns the name of the dbnode performing the autovac operation on a table. If the table information is invalid or the node information is abnormal, **NULL** will be returned. + + Return type: text + +- pg\_stat\_get\_last\_data\_changed\_time\(oid\) + + Description: Returns the time when **INSERT**, **UPDATE**, **DELETE**, or **EXCHANGE**/**TRUNCATE**/**DROP** **PARTITION** was performed last time on a table. The data in the **last\_data\_changed** column of the [PG\_STAT\_ALL\_TABLES](pg_stat_all_tables.md) view is calculated by using this function. The performance of obtaining the last modification time by using the view is poor when the table has a large amount of data. In this case, you are advised to use the function. + + Return type: timestamptz + +- pg\_stat\_set\_last\_data\_changed\_time\(oid\) + + Description: Manually changes the time when **INSERT**, **UPDATE**, **DELETE**, or **EXCHANGE**/**TRUNCATE**/**DROP** **PARTITION** was performed last time. + + Return type: void + +- pg\_backend\_pid\(\) + + Description: Thread ID of the server thread attached to the current session + + Return type: integer + +- pg\_stat\_get\_activity\(integer\) + + Description: Returns a record about the backend with the specified PID. A record for each active backend in the system is returned if **NULL** is specified. The return results are a subnet of those \(excluding the **connection\_info** column\) in the [PG\_STAT\_ACTIVITY](pg_stat_activity.md) view. + + Return type: setofrecord + +- pg\_stat\_get\_activity\_with\_conninfo\(integer\) + + Description: Returns a record about the backend with the specified PID. A record for each active backend in the system is returned if **NULL** is specified. The return results are a subnet of those in the [PG\_STAT\_ACTIVITY](pg_stat_activity.md) view. + + Return type: setofrecord + +- pg\_user\_iostat\(text\) + + Description: Displays the I/O load management information about the job currently executed by the user. + + Return type: record + + The following table describes return fields. + + + - - - - - - - - - - - - - - - - - - - - - - - -

Name

Type

+

Type

Description

+

Description

node_name

+

userid

text

+

oid

Instance name

+

User ID.

ckpt_redo_point

+

min_curr_iops

text

+

int4

Checkpoint of the current instance

+

Minimum I/O of the current user across database nodes. The IOPS is counted by ones for column storage and by ten thousands for row storage.

ckpt_clog_flush_num

+

max_curr_iops

int8

+

int4

Number of Clog flushing pages from the startup time to the current time

+

Maximum I/O of the current user across database nodes. The IOPS is counted by ones for column storage and by thousands for row storage.

ckpt_csnlog_flush_num

+

min_peak_iops

int8

+

int4

Number of CSN log flushing pages from the startup time to the current time

+

Minimum peak I/O of the current user across database nodes. The IOPS is counted by ones for column storage and by thousands for row storage.

ckpt_multixact_flush_num

+

max_peak_iops

int8

+

int4

Number of MultiXact flushing pages from the startup time to the current time

+

Maximum peak I/O of the current user across database nodes. The IOPS is counted by ones for column storage and by thousands for row storage.

ckpt_predicate_flush_num

+

io_limits

int8

+

int4

Number of predicate flushing pages from the startup time to the current time

+

io_limits set for the resource pool specified by the user. The IOPS is counted by ones for column storage and by thousands for row storage.

ckpt_twophase_flush_num

+

io_priority

int8

+

text

Number of two-phase flushing pages from the startup time to the current time

+

io_priority set for the user. The IOPS is counted by ones for column storage and by thousands for row storage.

- -- remote\_double\_write\_stat\(\) - - Description: Displays doublewrite file status of all instances in the cluster \(except the current node\). - - Return type: record - - **Table 8** remote\_double\_write\_stat parameter description - - -

Parameter

+
+ +- pg\_stat\_get\_function\_calls\(oid\) + + Description: Number of times the function has been called + + Return type: bigint + +- pg\_stat\_get\_function\_time\(oid\) + + Description: Total wall clock time spent in the function, in microseconds. Includes the time spent in functions called by this one. + + Return type: bigint + +- pg\_stat\_get\_function\_self\_time\(oid\) + + Description: Time spent in only this function. Time spent in called functions is excluded. + + Return type: bigint + +- pg\_stat\_get\_backend\_idset\(\) + + Description: Set of currently active server process numbers \(from 1 to the number of active server processes\) + + Return type: setofinteger + +- pg\_stat\_get\_backend\_pid\(integer\) + + Description: Thread ID of the given server thread + + Return type: bigint + +- pg\_stat\_get\_backend\_dbid\(integer\) + + Description: ID of the database connected to the given server process + + Return type: oid + +- pg\_stat\_get\_backend\_userid\(integer\) + + Description: User ID of the given server process + + Return type: oid + +- pg\_stat\_get\_backend\_activity\(integer\) + + Description: Active command of the given server process, but only if the current user is a system administrator or the same user as that of the session being queried and **track\_activities** is on + + Return type: text + +- pg\_stat\_get\_backend\_waiting\(integer\) + + Description: True if the given server process is waiting for a lock, but only if the current user is a system administrator or the same user as that of the session being queried and **track\_activities** is on + + Return type: Boolean + +- pg\_stat\_get\_backend\_activity\_start\(integer\) + + Description: The time at which the given server process's currently executing query was started, but only if the current user is a system administrator or the same user as that of the session being queried and **track\_activities** is on + + Return type: timestamp with time zone + +- pg\_stat\_get\_backend\_xact\_start\(integer\) + + Description: The time at which the given server process's currently executing transaction was started, but only if the current user is a system administrator or the same user as that of the session being queried and **track\_activities** is on + + Return type: timestamp with time zone + +- pg\_stat\_get\_backend\_start\(integer\) + + Description: The time at which the given server process was started, or **NULL** if the current user is neither a system administrator nor the same user as that of the session being queried + + Return type: timestamp with time zone + +- pg\_stat\_get\_backend\_client\_addr\(integer\) + + Description: IP address of the client connected to the given server process. If the connection is over a Unix domain socket, or if the current user is neither a system administrator nor the same user as that of the session being queried, **NULL** will be returned. + + Return type: inet + +- pg\_stat\_get\_backend\_client\_port\(integer\) + + Description: TCP port number of the client connected to the given server process If the connection is over a Unix domain socket, **-1** will be returned. If the current user is neither a system administrator nor the same user as that of the session being queried, **NULL** will be returned. + + Return type: integer + +- pg\_stat\_get\_bgwriter\_timed\_checkpoints\(\) + + Description: The number of times the background writer has started timed checkpoints \(because the **checkpoint\_timeout** time has expired\) + + Return type: bigint + +- pg\_stat\_get\_bgwriter\_requested\_checkpoints\(\) + + Description: The number of times the background writer has started checkpoints based on requests from the backend because **checkpoint\_segments** has been exceeded or the **CHECKPOINT** command has been executed + + Return type: bigint + +- pg\_stat\_get\_bgwriter\_buf\_written\_checkpoints\(\) + + Description: The number of buffers written by the background writer during checkpoints + + Return type: bigint + +- pg\_stat\_get\_bgwriter\_buf\_written\_clean\(\) + + Description: The number of buffers written by the background writer for routine cleaning of dirty pages + + Return type: bigint + +- pg\_stat\_get\_bgwriter\_maxwritten\_clean\(\) + + Description: The number of times the background writer has stopped its cleaning scan because it has written more buffers than specified in the **bgwriter\_lru\_maxpages** parameter + + Return type: bigint + +- pg\_stat\_get\_buf\_written\_backend\(\) + + Description: The number of buffers written by the backend because they needed to allocate a new buffer + + Return type: bigint + +- pg\_stat\_get\_buf\_alloc\(\) + + Description: The total number of buffer allocations + + Return type: bigint + +- pg\_stat\_clear\_snapshot\(\) + + Description: Discards the current statistics snapshot. + + Return type: void + +- pg\_stat\_reset\(\) + + Description: Resets all statistics counters for the current database to zero \(requires system administrator permissions\). + + Return type: void + +- pg\_stat\_reset\_shared\(text\) + + Description: Resets all statistics counters for the current database in each node in a shared cluster to zero \(requires system administrator permissions\). + + Return type: void + +- pg\_stat\_reset\_single\_table\_counters\(oid\) + + Description: Resets statistics for a single table or index in the current database to zero \(requires system administrator permissions\). + + Return type: void + +- pg\_stat\_reset\_single\_function\_counters\(oid\) + + Description: Resets statistics for a single function in the current database to zero \(requires system administrator permissions\). + + Return type: void + +- pg\_stat\_session\_cu\(int, int, int\) + + Description: Obtains the compression unit \(CU\) hit statistics of sessions running on the current node. + + Return type: record + +- gs\_get\_stat\_session\_cu\(text, int, int, int\) + + Description: Obtains the CU hit statistics of all running sessions in openGauss. + + Return type: record + +- gs\_get\_stat\_db\_cu\(text, text, int, int, int\) + + Description: Obtains the CU hit statistics of a database in openGauss. + + Return type: record + +- pg\_stat\_get\_cu\_mem\_hit\(oid\) + + Description: Obtains the number of CU memory hits of a column storage table in the current database of the current node. + + Return type: bigint + +- pg\_stat\_get\_cu\_hdd\_sync\(oid\) + + Description: Obtains the times CU is synchronously read from a disk by a column storage table in the current database of the current node. + + Return type: bigint + +- pg\_stat\_get\_cu\_hdd\_asyn\(oid\) + + Description: Obtains the times CU is asynchronously read from a disk by a column storage table in the current database of the current node. + + Return type: bigint + +- pg\_stat\_get\_db\_cu\_mem\_hit\(oid\) + + Description: Obtains the CU memory hit in a database of the current node. + + Return type: bigint + +- pg\_stat\_get\_db\_cu\_hdd\_sync\(oid\) + + Description: Obtains the times CU is synchronously read from a disk by a database of the current node. + + Return type: bigint + +- pgxc\_get\_wlm\_current\_instance\_info\(text, int default null\) + + Description: Queries the current resource usage on the primary database node and reads the data that is not stored in section "5.19.2.3 GS\_WLM\_INSTANCE\_HISTORY" system catalog in the memory. The input parameters are the node name \(**ALL**, **C**, **D**, or _instance name_\) and the maximum number of records returned by each node. The returned value is **GS\_WLM\_INSTANCE\_HISTORY**. + + Return type: setofrecord + +- pgxc\_get\_wlm\_history\_instance\_info\(text, TIMESTAMP, TIMESTAMP, int default null\) + + Description: Queries the historical resource usage on the primary database node and reads the data in section "GS\_WLM\_INSTANCE\_HISTORY" system catalog in the memory. The input parameters are as follows: node name \(**ALL**, **C**, **D**, or _instance name_\), start time, end time, and maximum number of records returned for each instance. The returned value is **GS\_WLM\_INSTANCE\_HISTORY**. + + Return type: setofrecord + + +- pg\_stat\_get\_db\_cu\_hdd\_asyn\(oid\) + + Description: Obtains the times CU is asynchronously read from a disk by a database of the current node. + + Return type: bigint + + +- pg\_stat\_bad\_block\(text, int, int, int, int, int, timestamp with time zone, timestamp with time zone\) + + Description: Obtains damage information about pages or CUs after the current node is started. + + Example: select \* from pg\_stat\_bad\_block\(\); + + Return type: record + +- pg\_stat\_bad\_block\_clear\(\) + + Description: Deletes the page and CU damage information that is read and recorded on the node. \(System administrator rights are required.\) + + Return type: void + +- gs\_respool\_exception\_info\(pool text\) + + Description: Queries for the query rule of a specified resource pool. + + Return type: record + +- gs\_control\_group\_info\(pool text\) + + Description: Queries for information about Cgroups associated with a resource pool. + + Return type: record + + The following table describes return fields. + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Attribute

Type

+

Attribute Value

Description

+

Description

node_name

-

text

-

Instance name

-

curr_dwn

-

int8

-

Sequence number of the doublewrite file

-

curr_start_page

+

name

int8

+

class_a:workload_a1

Start page for restoring the doublewrite file

+

Name of class and workload

file_trunc_num

+

class

int8

+

class_a

Number of times that the doublewrite file is reused

+

Class Cgroup name

file_reset_num

+

workload

int8

+

workload_a1

Number of reset times after the doublewrite file is full

+

Workload Cgroup name

total_writes

+

type

int8

+

DEFWD

Total number of I/Os of the doublewrite file

+

Cgroup type (Top, CLASS, BAKWD, DEFWD, and TSWD)

low_threshold_writes

+

gid

int8

+

87

Number of I/Os for writing doublewrite files with low efficiency (the number of I/O flushing pages at a time is less than 16)

+

Cgroup ID

high_threshold_writes

+

shares

int8

+

30

Number of I/Os for writing doublewrite files with high efficiency (the number of I/O flushing pages at a time is more than 421)

+

Percentage of CPU resources to those on the parent node

total_pages

+

limits

int8

+

0

Total number of pages that are flushed to the doublewrite file area

+

Percentage of CPU cores to those on the parent node

low_threshold_pages

+

rate

int8

+

0

Number of pages that are flushed with low efficiency

+

Allocation raio in Timeshare

high_threshold_pages

+

cpucores

int8

+

0-3

Number of pages that are flushed with high efficiency

+

CPU cores

- -- remote\_pagewriter\_stat\(\) - - Description: Displays the page flushing information and checkpoint information about all instances in the cluster \(except the current node\). - - Return type: record - - **Table 9** remote\_pagewriter\_stat parameter description - - -

Parameter

+
+ +- get\_instr\_workload\_info\(integer\) + + Description: Obtains the transaction volume and time information on the primary database node. + + Return type: record + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Attribute

Type

+

Attribute Value

Description

+

Description

node_name

-

text

-

Instance name

-

pgwr_actual_flush_total_num

-

int8

-

Total number of dirty pages flushed from the startup time to the current time

-

pgwr_last_flush_num

-

int4

-

Number of dirty pages flushed in the previous batch

-

remain_dirty_page_num

-

int8

-

Estimated number of dirty pages that are not flushed

-

queue_head_page_rec_lsn

+

resourcepool_oid

text

+

10

recovery_lsn of the first dirty page in the dirty page queue of the current instance

+

OID of the resource pool (the logic is equivalent to the load)

queue_rec_lsn

+

commit_counter

text

+

4

recovery_lsn of the dirty page queue of the current instance

+

Number of front-end transactions that were committed

current_xlog_insert_lsn

+

rollback_counter

text

+

1

Write position of Xlogs in the current instance

+

Number of front-end transactions that were rolled back

ckpt_redo_point

+

resp_min

text

+

949

Checkpoint of the current instance

+

Minimum response time of front-end transactions (unit: μs)

- -- remote\_recovery\_status\(\) - - Description: Displays log flow control information about the primary and standby nodes \(except the current node\). - - Return type: record - - **Table 10** remote\_recovery\_status parameter description - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Parameter

-

Type

-

Description

-

node_name

+

resp_max

text

+

201891

Node name (including the primary and standby nodes)

+

Maximum response time of front-end transactions (unit: μs)

standby_node_name

+

resp_avg

text

+

43564

Name of the standby node

+

Average response time of front-end transactions (unit: μs)

source_ip

+

resp_total

text

+

217822

IP address of the primary node

+

Total response time of front-end transactions (unit: μs)

source_port

+

bg_commit_counter

int4

+

910

Port number of the primary node

+

Number of background transactions that were committed

dest_ip

+

bg_rollback_counter

text

+

0

IP address of the standby node

+

Number of background transactions that were rolled back

dest_port

+

bg_resp_min

int4

+

97

Port number of the standby node

+

Minimum response time of background transactions (unit: μs)

current_rto

+

bg_resp_max

int8

+

678080687

Current log flow control time of the standby node (unit: s)

+

Maximum response time of background transactions (unit: μs)

target_rto

+

bg_resp_avg

int8

+

327847884

Expected flow control time of the standby node specified by the corresponding GUC parameter (unit: s)

+

Average response time of background transactions (unit: μs)

current_sleep_time

+

bg_resp_total

int8

+

298341575300

Sleep time required to achieve the expected flow control time (unit: μs)

+

Total response time of background transactions (unit: μs)

- -- remote\_redo\_stat\(\) - - Description: Displays the log replay status of all instances in the cluster \(except the current node\). - - Return type: record - - **Table 11** remote\_redo\_stat parameter description - - -

Parameter

+
+ +- pv\_instance\_time\(\) + + Description: Obtains the time consumed in each execution phase on the current node. + + Return type: record + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Stat_name Attribute

Type

+

Attribute Value

Description

+

Description

node_name

-

text

-

Instance name

-

redo_start_ptr

-

int8

-

Start point for replaying the instance logs

-

redo_start_time

-

int8

-

Start time (UTC) when the instance logs are replayed

-

redo_done_time

-

int8

-

End time (UTC) when the instance logs are replayed

-

curr_time

-

int8

-

Current time (UTC) of the instance

-

min_recovery_point

-

int8

-

Position of the minimum consistency point for the instance logs

-

read_ptr

-

int8

-

Position for reading the instance logs

-

last_replayed_read_ptr

-

int8

-

Position for replaying the instance logs

-

recovery_done_ptr

-

int8

-

Replay position after the instance is started

-

read_xlog_io_counter

-

int8

-

Number of I/Os when the instance reads and replays logs

-

read_xlog_io_total_dur

-

int8

-

Total I/O latency when the instance reads and replays logs

-

read_data_io_counter

-

int8

-

Number of data page I/O reads during replay in the instance

-

read_data_io_total_dur

-

int8

-

Total I/O latency of data page reads during replay in the instance

-

write_data_io_counter

+

DB_TIME

int8

+

1062385

Number of data page I/O writes during replay in the instance

+

Total end-to-end wall time consumed by all threads (unit: μs)

write_data_io_total_dur

+

CPU_TIME

int8

+

311777

Total I/O latency of data page writes during replay in the instance

+

Total CPU time consumed by all threads (unit: μs)

process_pending_counter

+

EXECUTION_TIME

int8

+

380037

Number of synchronization times of log distribution threads during replay in the instance

+

Total time consumed on the executor (unit: μs)

process_pending_total_dur

+

PARSE_TIME

int8

+

6033

Total synchronization latency of log distribution threads during replay in the instance

+

Total time consumed for parsing SQL statements (unit: μs)

apply_counter

+

PLAN_TIME

int8

+

173356

Number of synchronization times of replay threads during replay in the instance

+

Total time consumed for generating an execution plan (unit: μs)

apply_total_dur

+

REWRITE_TIME

int8

+

2274

Total synchronization latency of replay threads during replay in the instance

+

Total time consumed on query rewriting (unit: μs)

speed

+

PL_EXECUTION_TIME

int8

+

0

Log replay rate of the current instance

+

Total time consumed for executing PL/SQL statements (unit: μs)

local_max_ptr

+

PL_COMPILATION_TIME

int8

+

557

Maximum number of replay logs received by the local host after the instance is started

+

Total time consumed for SQL compilation (unit: μs)

primary_flush_ptr

+

NET_SEND_TIME

int8

+

1673

Log point where the host flushes logs to a disk

+

Total time consumed for sending data over network (unit: μs)

worker_info

+

DATA_IO_TIME

text

+

426622

Replay thread information of the instance. If concurrent replay is not enabled, the value is NULL.

+

Total time consumed for data read and write (unit: μs)

- - -Example: - -The function **pg\_backend\_pid** shows the ID of the current server thread. - -``` -postgres=# SELECT pg_backend_pid(); - pg_backend_pid ------------------ - 139706243217168 -(1 row) -``` - -The function **pg\_stat\_get\_backend\_pid** shows the ID of a given server thread. - -``` -postgres=# SELECT pg_stat_get_backend_pid(1); - pg_stat_get_backend_pid -------------------------- - 139706243217168 -(1 row) -``` - +
+ +- DBE\_PERF.get\_global\_instance\_time\(\) + + Description: Provides the time consumption of each key phase of openGauss. This function is supported only on the primary node of the database. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- get\_instr\_unique\_sql\(\) + + Description: Obtains information about execution statements \(normalized SQL statements\) on the current node as a user with the **sysadmin** permission. + + Return type: record + +- reset\_unique\_sql\(text, text, bigint\) + + Description: Resets information about system execution statements \(normalized SQL statements\) information as a user with the **sysadmin** permission. The value of the first parameter can be** global** or **local**. **global** indicates that information on all nodes is cleared, and **local** indicates that only information on the current node is cleared. The value of the second parameter can be **ALL**, **BY\_USERID**, or **BY\_CNID**. **ALL** indicates that all information is cleared. **BY\_USERID** indicates that the SQL information of the user specified by **USERID** is cleared. **BY\_CNID** indicates that the SQL information related to the primary node of the database in the system is cleared. The third parameter indicates **CNID** and **USERID**. If the second parameter is set to **ALL**, the third parameter does not take effect and can be set to any value. + + Return type: Boolean + +- get\_instr\_wait\_event\(NULL\) + + Description: Obtains the statistics on wait events of the current node. + + Return type: record + +- get\_instr\_user\_login\(\) + + Description: Obtains the number of user login and logout times of the current node as a user with the **sysadmin** permission. + + Return type: record + +- get\_instr\_rt\_percentile\(\) + + Description: Obtains the response time distribution for 80% and 95% SQL statements in the CCN node. The unified cluster information of openGauss is stored on the CCN node. The query result from other nodes is **0**. + + Return type: record + +- get\_node\_stat\_reset\_time\(\) + + Description: Obtains statistics about reset \(restart, primary/standby switchover, and database deletion\) time of the current node. + + Return type: record + +- DBE\_PERF.get\_global\_os\_runtime\(\) + + Description: Displays the running status of the current OS. This function is supported only on the primary node of the database. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_os\_threads\(\) + + Description: Provides information about the threads under all normal nodes of openGauss. This function is supported only on the primary node of the database. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_summary\_workload\_sql\_count\(\) + + Description: Provides statistics about the number of SELECT, UPDATE, INSERT, DELETE, DDL, DML, and DCL statements of different service loads in openGauss. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_summary\_workload\_sql\_elapse\_time\(\) + + Description: Provides statistics about the number of SELECT, UPDATE, INSERT, and DELETE statements and response time information \(TOTAL, AVG, MIN, and MAX\) for different loads in openGauss. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_workload\_transaction\(\) + + Description: Obtains the transaction volume and time information on all nodes of openGauss. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_session\_stat\(\) + + Description: Obtains the session status information on all nodes of openGauss. To query this function, you must have the **sysadmin** permission. + + Return type: record + + >![](public_sys-resources/icon-note.gif) **NOTE:** + >The status information contains the following 17 items: **commit**, **rollback**, **sql**, **table\_scan**, **blocks\_fetched**, **physical\_read\_operation**, + >shared\_blocks\_dirtied,local\_blocks\_dirtied,shared\_blocks\_read,local\_blocks\_read, + >blocks\_read\_time,blocks\_write\_time,sort\_imemory,sort\_idisk,cu\_mem\_hit, + >cu\_hdd\_sync\_read,cu\_hdd\_asyread + +- DBE\_PERF.get\_global\_session\_time\(\) + + Description: Provides the time consumed in each key phase of each node in openGauss. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_session\_memory\(\) + + Description: Displays statistics about memory usage at the session level on each node in the unit of MB, including all the memory allocated to Postgres and stream threads on DNs for jobs currently executed by users. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_session\_memory\_detail\(\) + + Description: Displays statistics about thread memory usage on each node by MemoryContext node. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- gs\_session\_memory\_detail\_tp + + Description: Collects statistics about thread memory usage by MemoryContext node. When **enable\_thread\_pool** is set to **on**, this view contains memory usage of all threads and sessions. + + Return type: record + +- DBE\_PERF.get\_global\_session\_stat\_activity\(\) + + Description: Displays information about threads that are running on each node in openGauss. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_thread\_wait\_status\(\) + + Description: Displays the block waiting status of backend threads and auxiliary threads on all nodes. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_wlm\_user\_resource\_runtime\(\) + + Description: Displays the resource usage of all users. This parameter is valid only when **use\_workload\_manager** is set to **on**. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_operator\_history\_table\(\) + + Description: Displays the operator-related records \(persistent\) generated after jobs are executed on the primary database node of the current user. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_operator\_history\(\) + + Description: Displays the operator-related records generated after jobs are executed on the primary database node of the current user. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_operator\_runtime\(\) + + Description: Displays real-time operator-related records of jobs executed on the primary database node of the current user. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_statement\_complex\_history\(\) + + Description: Displays the historical records of complex queries on the primary database node of the current user. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_statement\_complex\_history\_table\(\) + + Description: Displays the historical records \(persistent\) of complex queries on the primary database node of the current user. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_statement\_complex\_runtime\(\) + + Description: Displays the real-time information of complex queries on the primary database node of the current user. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_memory\_node\_detail\(\) + + Description: Displays the memory usage of a certain database on all nodes. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_shared\_memory\_detail\(\) + + Description: Displays the usage information about all the shared memory contexts of all nodes. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_statio\_all\_indexes + + Description: Displays statistics about each index displayed in a row in the current database, showing I/O statistics about accesses to that specific index. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_local\_toastname\_and\_toastindexname\(\) + + Description: Provides the mapping between the name and index of the local TOAST table and its associated tables. + + Return type: record + +- DBE\_PERF.get\_summary\_statio\_all\_indexes\(\) + + Description: Collects statistics about each index displayed in a row in the current databases of all nodes and displays the I/O statistics of a specific index. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_statio\_all\_sequences\(\) + + Description: Provides I/O status information about all sequences in the namespace. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_statio\_all\_tables\(\) + + Description: Displays the I/O statistics about each table in databases on each node as a user with the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_summary\_statio\_all\_tables\(\) + + Description: Collects I/O statistics about each table in databases in openGauss. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_local\_toast\_relation\(\) + + Description: Provides the mapping between the name of the local toast table and its associated table. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_statio\_sys\_indexes\(\) + + Description: Displays the I/O status information about all system catalog indexes in namespaces on each node. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_summary\_statio\_sys\_indexes\(\) + + Description: Collects the I/O status information about all system catalog indexes in namespaces on each node. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_statio\_sys\_sequences\(\) + + Description: Provides the I/O status information about all the system sequences in the namespace. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_statio\_sys\_tables\(\) + + Description: Provides I/O status information about all system catalogs in namespaces on each node. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_summary\_statio\_sys\_tables\(\) + + Description: Displays the I/O status information of all system catalogs in the namespace in openGauss. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_statio\_user\_indexes\(\) + + Description: Displays the I/O status information about all user relationship table indexes in namespaces on each node. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_summary\_statio\_user\_indexes\(\) + + Description: Displays the I/O status information about all user relationship table indexes in namespaces in openGauss. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_statio\_user\_sequences\(\) + + Description: Displays the I/O status information about all user sequences in the namespace of each node. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_statio\_user\_tables\(\) + + Description: Displays the displays I/O status information about all user relationship tables in namespaces on each node. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_summary\_statio\_user\_tables\(\) + + Description: Displays the I/O status information about all user relationship tables in namespaces in openGauss. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_stat\_db\_cu\(\) + + Description: Queries CU hits in a database and in each node in openGauss. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_stat\_all\_indexes\(\) + + Description: Displays statistics of each index in databases on all nodes. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_summary\_stat\_all\_indexes\(\) + + Description: Collects statistics on each index in all databases on all nodes. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_stat\_sys\_tables\(\) + + Description: Displays statistics about the system catalogs of all the namespaces in **pg\_catalog** and **information\_schema** schemas on each node. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_summary\_stat\_sys\_tables\(\) + + Description: Collects statistics about the system catalogs of all the namespaces in **pg\_catalog** and **information\_schema** schemas on each node. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_stat\_sys\_indexes\(\) + + Description: Displays index status information about all the system catalogs in the **pg\_catalog** and **information\_schema** schemas on each node. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_summary\_stat\_sys\_indexes\(\) + + Description: Collects statistics about index status information about all the system catalogs in the **pg\_catalog** and **information\_schema** schemas on each node. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_stat\_user\_tables\(\) + + Description: Displays the status information about customized ordinary tables in all namespaces. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_summary\_stat\_user\_tables\(\) + + Description: Collects statistics about the status information about customized ordinary tables in all namespaces. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_stat\_user\_indexes\(\) + + Description: Displays the status information about the index of customized ordinary tables in all databases. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_summary\_stat\_user\_indexes\(\) + + Description: Collects statistics about the status information about the index of customized ordinary tables in all databases. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_stat\_database\(\) + + Description: Displays database statistics of all nodes. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_stat\_database\_conflicts\(\) + + Description: Collects statistics on the database of all nodes. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_stat\_xact\_all\_tables\(\) + + Description: Displays transaction status information about all ordinary tables and TOAST tables in all namespaces. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_summary\_stat\_xact\_all\_tables\(\) + + Description: Collects statistics about transaction status information about all ordinary tables and TOAST tables in all namespaces. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_stat\_xact\_sys\_tables\(\) + + Description: Displays transaction status information about all system catalogs in namespaces on all nodes. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_summary\_stat\_xact\_sys\_tables\(\) + + Description: Collects statistics about transaction status information about all system catalogs in namespaces on all nodes. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_stat\_xact\_user\_tables\(\) + + Description: Displays the transaction status information of the user tables in the namespaces on all nodes. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_summary\_stat\_xact\_user\_tables\(\) + + Description: Collects statistics about the transaction status information of the user tables in the namespaces on all nodes. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_stat\_user\_functions\(\) + + Description: Displays the transaction status information of customized functions in the namespaces on all nodes. To query the function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_stat\_xact\_user\_functions\(\) + + Description: Collects statistics about the transaction status information of customized functions in the namespaces on all nodes. To query the function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_stat\_bad\_block\(\) + + Description: Displays information about table and index read failures on all nodes. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_file\_redo\_iostat\(\) + + Description: Collects statistics on information about table and index read failures on all nodes. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_file\_iostat\(\) + + Description: Displays statistics about data file I/Os on all nodes. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_locks\(\) + + Description: Displays lock information of all nodes. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_replication\_slots\(\) + + Description: Displays logical replication information on all nodes. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_bgwriter\_stat\(\) + + Description: Displays statistics about the background writer process's activities on all nodes. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_replication\_stat\(\) + + Description: Displays information about log synchronization status on each node, such as the locations where the sender sends logs and where the receiver receives logs. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_transactions\_running\_xacts\(\) + + Description: Displays information about running transactions on each node. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_summary\_transactions\_running\_xacts\(\) + + Description: Collects statistics of information about running transactions on each node. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_transactions\_prepared\_xacts\(\) + + Description: Displays information about transactions that are currently prepared for two-phase commit on each node. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_summary\_transactions\_prepared\_xacts\(\) + + Description: Collects statistics information about transactions that are currently prepared for two-phase commit on each node. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_summary\_statement\(\) + + Description: Displays the status information of the historically-executed statements on each node. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_statement\_count\(\) + + Description: Displays the number of SELECT, UPDATE, INSERT, and DELETE statements and response time information \(TOTAL, AVG, MIN, and MAX\) on each node. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_config\_settings\(\) + + Description: Displays GUC parameter configuration information on each node. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_wait\_events\(\) + + Description: Displays the wait event status information on each node. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_statement\_responsetime\_percentile\(\) + + Description: Obtains the response time distribution for 80% and 95% SQL statements of openGauss. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_summary\_user\_login\(\) + + Description: Collects statistics about number of user login and logout times on each node in openGauss. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- DBE\_PERF.get\_global\_record\_reset\_time\(\) + + Description: Displays the statistics about reset \(restart, primary/standby switchover, and database deletion\) time of openGauss. To query this function, you must have the **sysadmin** permission. + + Return type: record + +- gs\_wlm\_user\_resource\_info\(name text\) + + Description: Queries for a user's resource quota and resource usage. + + Return type: record + +- get\_local\_rel\_iostat\(\) + + Description: Queries the accumulated I/O status of data files on the current node. + + Return type: record + +- DBE\_PERF.get\_global\_rel\_iostat\(\) + + Description: Displays statistics about data file I/Os on all nodes. To query this function, you must have the **sysadmin** permission. + + Return type: record + + +Example: + +The function **pg\_backend\_pid** shows the ID of the current server thread. + +``` +postgres=# SELECT pg_backend_pid(); + pg_backend_pid +----------------- + 139706243217168 +(1 row) +``` + +The function **pg\_stat\_get\_backend\_pid** shows the ID of a given server thread. + +``` +postgres=# SELECT pg_stat_get_backend_pid(1); + pg_stat_get_backend_pid +------------------------- + 139706243217168 +(1 row) +``` + diff --git a/content/en/docs/Developerguide/synchronous-redo-logging.md b/content/en/docs/Developerguide/synchronous-redo-logging.md deleted file mode 100644 index 80f5ba2bfa271c4592734075657dead70d23a45f..0000000000000000000000000000000000000000 --- a/content/en/docs/Developerguide/synchronous-redo-logging.md +++ /dev/null @@ -1,20 +0,0 @@ -# Synchronous Redo Logging - -The **Synchronous Redo Logging** option is the simplest and most strict redo logger. When a transaction is committed by a client application, the transaction redo entries are recorded in the WAL \(Redo Log\), as follows – - -1. While a transaction is in progress, it is stored in the MOT’s memory. -2. After a transaction finishes and the client application sends a **Commit** command, the transaction is locked and then written to the WAL Redo Log on the disk. This means that while the transaction log entries are being written to the log, the client application is still waiting for a response. -3. As soon as the transaction's entire buffer is written to the log, the changes to the data in memory take place and then the transaction is committed. After the transaction has been committed, the client application is notified that the transaction is complete. - -## **Technical Description** - -When a transaction ends, the SynchronousRedoLogHandler serializes its transaction buffer and write it to the XLOG iLogger implementation. - -**Figure 1** Synchronous Logging![](figures/synchronous-logging.png) - -## **Summary** - -The **Synchronous Redo Logging** option is the safest and most strict because it ensures total synchronization of the client application and the WAL Redo log entries for each transaction as it is committed; thus ensuring total durability and consistency with absolutely no data loss. This logging option prevents the situation where a client application might mark a transaction as successful, when it has not yet been persisted to disk. - -The downside of the **Synchronous Redo Logging** option is that it is the slowest logging mechanism of the three options. This is because a client application must wait until all data is written to disk and because of the frequent disk writes \(which typically slow down the database\). - diff --git a/content/en/docs/Developerguide/transaction-management.md b/content/en/docs/Developerguide/transaction-management.md new file mode 100644 index 0000000000000000000000000000000000000000..eba8e9a07b975eaa7bac317faa0bd8188c388e33 --- /dev/null +++ b/content/en/docs/Developerguide/transaction-management.md @@ -0,0 +1,74 @@ +# Transaction Management + +The **COMMIT** and **ROLLBACK** commands can be used to end a transaction when a stored procedure or anonymous block is called. After these commands are executed in a transaction, a new transaction is automatically started. You do not need to run the **START TRANSACTION** command separately. \(Note that BEGIN and END have different meanings in PL/SQL.\) In addition, stored procedures or anonymous blocks with transaction commands cannot be called in the transaction blocks that are explicitly started by users. + +**Example** + +``` +CREATE TABLE test1 (a int); +CREATE PROCEDURE transaction_test1() +AS +BEGIN + FOR i IN 0..9 LOOP + INSERT INTO test1 (a) VALUES (i); + IF i % 2 = 0 THEN + COMMIT; + ELSE + ROLLBACK; + END IF; + END LOOP; +END; +/ + +CALL transaction_test1(); +``` + +>![](public_sys-resources/icon-note.gif) **NOTE:** +>When a new transaction starts, it has the default transaction features, such as the transaction isolation level. +>The function call does not support transaction control. If you attempt to use transaction control in the function, an error is reported. In addition, for the nested use such as proc1\(\)-\>func2\(\)-\>proc3\(\), the last stored procedure cannot be used for transaction control because functions are called during the process. + +There are special considerations for cursor loops. The following is an example: + +``` +CREATE PROCEDURE transaction_test2() +AS +DECLARE + r RECORD; +BEGIN + FOR r IN SELECT * FROM test2 ORDER BY x LOOP + INSERT INTO test1 (a) VALUES (r.x); + COMMIT; + END LOOP; +END; +/ + +CALL transaction_test2(); +``` + +Typically, cursors are automatically closed when transactions are committed. However, a cursor that is created as part of a loop is automatically made a holdable cursor by the first COMMIT or ROLLBACK. This means that the cursor is fully computed at the first COMMIT or ROLLBACK, rather than being computed line by row. The cursor is still deleted automatically after the loop, so it is usually invisible to users. + +>![](public_sys-resources/icon-note.gif) **NOTE:** +>A cursor loop driven by non-read-only commands \(UPDATE... RETURNING\) is not allowed to have transaction commands. + +Transactional operations are also supported in a block with an exception handling section, as shown in the following example: + +``` +CREATE PROCEDURE transaction_test3() +AS +BEGIN + INSERT INTO test1 (a) VALUES (1); + COMMIT; + INSERT INTO test1 (a) VALUES (1/0); + COMMIT; +EXCEPTION + WHEN division_by_zero THEN + RAISE NOTICE 'caught division_by_zero'; +END; +/ + +CALL transaction_test3(); +``` + +>![](public_sys-resources/icon-note.gif) **NOTE:** +>After the preceding stored procedure is executed, an exception is captured, but the first insert operation is completed normally. + diff --git a/content/en/docs/Developerguide/type-conversion-functions.md b/content/en/docs/Developerguide/type-conversion-functions.md index 8400f0f6ef5fdcdd72d92e088d0c04d8c22bc764..5362e0d94c3b2dad16af1d3d87e2e72267320f23 100644 --- a/content/en/docs/Developerguide/type-conversion-functions.md +++ b/content/en/docs/Developerguide/type-conversion-functions.md @@ -315,24 +315,21 @@ (1 row) ``` -- to\_date\(text\) +- to\_date\(text\) - Description: Converts values of the text type into the timestamp in the specified format.Currently only two types of formats are supported: + Description: Converts values of the text type into the timestamp in the specified format. - + Format 1: Date without separators, such as 20150814, including the complete year, month, and day. - + Format 2: Date with separator, such as 2014-08-14, the separator can be any single non-digit character. - - Return type: timestamp + Return type: timestamp - For example: + For example: - ``` - postgres=# SELECT to_date('2015-08-14'); - to_date - --------------------- - 2015-08-14 00:00:00 - (1 row) - ``` + ``` + postgres=# SELECT to_date('2015-08-14'); + to_date + --------------------- + 2015-08-14 00:00:00 + (1 row) + ``` - to\_date\(text, text\) diff --git a/content/en/docs/Developerguide/upgrade-parameters.md b/content/en/docs/Developerguide/upgrade-parameters.md index 193d9cd4b1071279030578176fe3a1edd77398d8..3859a0007f74a7d05f0dd2edcd3a66d6854a840f 100644 --- a/content/en/docs/Developerguide/upgrade-parameters.md +++ b/content/en/docs/Developerguide/upgrade-parameters.md @@ -2,7 +2,7 @@ ## IsInplaceUpgrade -**Parameter description**: Specifies whether an upgrade is ongoing. This parameter cannot be modified by users. +**Parameter description**: Specifies whether an upgrade is ongoing. This parameter is an internal parameter for upgrade and cannot be modified by users. This parameter is a SUSET parameter. Set it based on instructions provided in [Table 1](resetting-parameters.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). @@ -15,7 +15,7 @@ This parameter is a SUSET parameter. Set it based on instructions provided in [ ## inplace\_upgrade\_next\_system\_object\_oids -**Parameter description**: Indicates the OID of a new system object during the in-place upgrade. This parameter cannot be modified by users. +**Parameter description**: Indicates the OID of a new system object during the in-place upgrade. This parameter is an internal parameter for upgrade and cannot be modified by users. This parameter is a SUSET parameter. Set it based on instructions provided in [Table 1](resetting-parameters.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846). @@ -25,7 +25,7 @@ This parameter is a SUSET parameter. Set it based on instructions provided in [ ## upgrade\_mode -**Parameter description**: Specifies the upgrade mode. You are advised not to modify this parameter. +**Parameter description**: Specifies the upgrade mode. This parameter is an internal parameter for upgrade. You are advised not to modify it. **Value range**: an integer ranging from 0 to _INT\_MAX_ diff --git a/content/en/menu/index.md b/content/en/menu/index.md index a8decba4531bd70d52fa05a8e15993a979d78192..dd95f7e3dd35abf25eac986bc08f03c1ce04cf21 100644 --- a/content/en/menu/index.md +++ b/content/en/menu/index.md @@ -199,6 +199,7 @@ headless: true - [Example: Retrying SQL Queries for Applications]({{< relref "./docs/Developerguide/example-retrying-sql-queries-for-applications.md" >}}) - [Example: Importing and Exporting Data Through Local Files]({{< relref "./docs/Developerguide/example-importing-and-exporting-data-through-local-files.md" >}}) - [Example 2: Migrating Data from a MY Database to openGauss]({{< relref "./docs/Developerguide/example-2-migrating-data-from-a-my-database-to-opengauss.md" >}}) + - [Example: Logic Replication Code]({{< relref "./docs/Developerguide/example-logic-replication-code.md" >}}) - [JDBC Interface Reference]({{< relref "./docs/Developerguide/jdbc-interface-reference.md" >}}) - [Development Based on ODBC]({{< relref "./docs/Developerguide/development-based-on-odbc.md" >}}) - [ODBC Packages, Dependent Libraries, and Header Files]({{< relref "./docs/Developerguide/odbc-packages-dependent-libraries-and-header-files.md" >}}) @@ -411,7 +412,6 @@ headless: true - [MOT Monitoring]({{< relref "./docs/Developerguide/mot-monitoring.md" >}}) - [MOT Error Messages]({{< relref "./docs/Developerguide/mot-error-messages.md" >}}) - [MOT Sample TPC-C Benchmark]({{< relref "./docs/Developerguide/mot-sample-tpc-c-benchmark.md" >}}) - - [MOT Sample PGBench Benchmark]({{< relref "./docs/Developerguide/MOT-Sample-PGBench-benchmark.md" >}}) - [Concepts of MOT]({{< relref "./docs/Developerguide/concepts-of-mot.md" >}}) - [MOT Scale-up Architecture]({{< relref "./docs/Developerguide/mot-scale-up-architecture.md" >}}) - [MOT Concurrency Control Mechanism]({{< relref "./docs/Developerguide/mot-concurrency-control-mechanism.md" >}}) @@ -424,12 +424,6 @@ headless: true - [MOT Indexes]({{< relref "./docs/Developerguide/mot-indexes.md" >}}) - [MOT Durability Concepts]({{< relref "./docs/Developerguide/mot-durability-concepts.md" >}}) - [MOT Logging – WAL Redo Log Concepts]({{< relref "./docs/Developerguide/mot-logging-wal-redo-log-concepts.md" >}}) - - [Synchronous Redo logging]({{< relref "./docs/Developerguide/synchronous-redo-logging.md" >}}) - - [Group Synchronous Redo Logging]({{< relref "./docs/Developerguide/group-synchronous-redo-logging.md" >}}) - - [Asynchronous Redo Logging]({{< relref "./docs/Developerguide/asynchronous-redo-logging.md" >}}) - - [Logging Design Overview]({{< relref "./docs/Developerguide/logging-design-overview.md" >}}) - - [Per Transaction Logging]({{< relref "./docs/Developerguide/per-transaction-logging.md" >}}) - - [Exception Handling]({{< relref "./docs/Developerguide/exception-handling.md" >}}) - [MOT Checkpoint Concepts]({{< relref "./docs/Developerguide/mot-checkpoint-concepts.md" >}}) - [MOT Recovery Concepts]({{< relref "./docs/Developerguide/mot-recovery-concepts.md" >}}) - [MOT Query Native Compilation \(JIT\)]({{< relref "./docs/Developerguide/mot-query-native-compilation-jit.md" >}}) @@ -749,6 +743,7 @@ headless: true - [NULL Statements]({{< relref "./docs/Developerguide/null-statements.md" >}}) - [Error Trapping Statements]({{< relref "./docs/Developerguide/error-trapping-statements.md" >}}) - [GOTO Statements]({{< relref "./docs/Developerguide/goto-statements.md" >}}) + - [Transaction Management]({{< relref "./docs/Developerguide/transaction-management.md" >}}) - [Other Statements]({{< relref "./docs/Developerguide/other-statements.md" >}}) - [Lock Operations]({{< relref "./docs/Developerguide/lock-operations.md" >}}) - [Cursor Operations]({{< relref "./docs/Developerguide/cursor-operations.md" >}}) @@ -1103,6 +1098,15 @@ headless: true - [SNAPSHOT.SNAPSHOT]({{< relref "./docs/Developerguide/snapshot-snapshot.md" >}}) - [SNAPSHOT.TABLES\_SNAP\_TIMESTAMP]({{< relref "./docs/Developerguide/snapshot-tables_snap_timestamp.md" >}}) - [WDR Snapshot Data Table]({{< relref "./docs/Developerguide/wdr-snapshot-data-table.md" >}}) + - [Logical Replication]({{< relref "./docs/Developerguide/logical-replication.md" >}}) + - [Logical Decoding]({{< relref "./docs/Developerguide/logical-decoding.md" >}}) + - [Overview]({{< relref "./docs/Developerguide/overview.md) + - [Logical Decoding by SQL Function Interfaces]({{< relref "./docs/Developerguide/logical-decoding-by-sql-function-interfaces.md" >}}) + - [Replicating Data Using the Logical Replication Tool]({{< relref "./docs/Developerguide/replicating-data-using-the-logical-replication-tool.md" >}}) + - [Foregin Data Wrapper]({{< relref "./docs/Developerguide/foregin-data-wrapper.md" >}}) + - [oracle\_fdw]({{< relref "./docs/Developerguide/oracle_fdw.md" >}}) + - [mysql\_fdw]({{< relref "./docs/Developerguide/mysql_fdw.md" >}}) + - [postgres\_fdw]({{< relref "./docs/Developerguide/postgres_fdw.md" >}}) - [GUC Parameters]({{< relref "./docs/Developerguide/guc-parameters.md" >}}) - [GUC Parameter Usage]({{< relref "./docs/Developerguide/guc-parameter-usage.md" >}}) - [File Location]({{< relref "./docs/Developerguide/file-location.md" >}})