MOT Error Messages

Errors may be caused by multiple scenarios. All errors are recorded in the log files of the database server. In addition, user-related errors are returned to the user as part of the response to a query, transaction, or stored procedure execution, or database management operation.

  • Errors reported in server logs include functions, entities, contexts, error messages, error description, and severity.
  • Errors reported to users are translated into standard PostgreSQL error codes, which may consist of MOT-specific messages and descriptions.

The error messages, description, and codes are described as follows. Error codes are internal codes and are not recorded or returned to users.

Errors Written to the Log File

All errors are recorded in the log files of the database server. The following lists the errors that are written to the database server log file but are not returned to users. The log file is stored in the data folder and named postgresql-DATE-TIME.log.

Table 1 Errors written to the log file

Log Message

Internal Error Code

Error code denoting success

MOT_NO_ERROR 0

Out of memory

MOT_ERROR_OOM 1

Invalid configuration

MOT_ERROR_INVALID_CFG 2

Invalid argument passed to function

MOT_ERROR_INVALID_ARG 3

System call failed

MOT_ERROR_SYSTEM_FAILURE 4

Resource limit reached

MOT_ERROR_RESOURCE_LIMIT 5

Internal logic error

MOT_ERROR_INTERNAL 6

Resource unavailable

MOT_ERROR_RESOURCE_UNAVAILABLE 7

Unique violation

MOT_ERROR_UNIQUE_VIOLATION 8

Invalid memory allocation size

MOT_ERROR_INVALID_MEMORY_SIZE 9

Index out of range

MOT_ERROR_INDEX_OUT_OF_RANGE 10

Error code unknown

MOT_ERROR_INVALID_STATE 11

Error Returned to Users

The following lists the errors that are written to the database server log file and returned to users.

MOT uses return codes (RCs) to return the Postgres standard error codes to the encapsulation. Some RCs may send error messages to users who are interacting with the database.

MOT internally returns the Postgres codes (see below) to the database package, and the database encapsulation reacts to the codes according to the standard Postgres behavior.

NOTE: In the prompt information, %s, %u, and %lu indicate the corresponding error information (such as query, table name, or other information).

  • %s: character string
  • %u: number
  • %lu: number

Table 2 Errors returned to users and recorded in the log file

Short/Long Description Returned to Users

Postgres Code

Internal Error Code

Success.

Denotes success

ERRCODE_SUCCESSFUL_

COMPLETION

RC_OK = 0

Failure

Unknown error has occurred.

ERRCODE_FDW_ERROR

RC_ERROR = 1

Unknown error has occurred.

Denotes aborted operation.

ERRCODE_FDW_ERROR

RC_ABORT

Column definition of %s is not supported.

Column type %s is not supported yet.

ERRCODE_INVALID_COLUMN_DEFINITION

RC_UNSUPPORTED_COL_TYPE

Column definition of %s is not supported.

Column type Array of %s is not supported yet.

ERRCODE_INVALID_COLUMN_DEFINITION

RC_UNSUPPORTED_COL_TYPE_ARR

Column size %d exceeds max tuple size %u.

Column definition of %s is not supported.

ERRCODE_FEATURE_NOT_SUPPORTED

RC_EXCEEDS_MAX_ROW_SIZE

Column name %s exceeds max name size %u.

Column definition of %s is not supported.

ERRCODE_INVALID_COLUMN_DEFINITION

RC_COL_NAME_EXCEEDS_MAX_SIZE

Column size %d exceeds max size %u.

Column definition of %s is not supported.

ERRCODE_INVALID_COLUMN_DEFINITION

RC_COL_SIZE_INVLALID

Cannot create table.

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

ERRCODE_FEATURE_NOT_

SUPPORTED

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

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

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

RC_TXN_EXCEEDS_MAX_DDLS

Unique constraint violation

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

Key %s already exists.

ERRCODE_UNIQUE_

VIOLATION

RC_UNIQUE_VIOLATION

Table \"%s\" does not exist.

ERRCODE_UNDEFINED_TABLE

RC_TABLE_NOT_FOUND

Index \"%s\" does not exist.

ERRCODE_UNDEFINED_TABLE

RC_INDEX_NOT_FOUND

Unknown error has occurred.

ERRCODE_FDW_ERROR

RC_LOCAL_ROW_FOUND

Unknown error has occurred.

ERRCODE_FDW_ERROR

RC_LOCAL_ROW_NOT_FOUND

Unknown error has occurred.

ERRCODE_FDW_ERROR

RC_LOCAL_ROW_DELETED

Unknown error has occurred.

ERRCODE_FDW_ERROR

RC_INSERT_ON_EXIST

Unknown error has occurred.

ERRCODE_FDW_ERROR

RC_INDEX_RETRY_INSERT

Unknown error has occurred.

ERRCODE_FDW_ERROR

RC_INDEX_DELETE

Unknown error has occurred.

ERRCODE_FDW_ERROR

RC_LOCAL_ROW_NOT_VISIBLE

Memory is temporarily unavailable.

ERRCODE_OUT_OF_LOGICAL_MEMORY

RC_MEMORY_ALLOCATION_ERROR

Unknown error has occurred.

ERRCODE_FDW_ERROR

RC_ILLEGAL_ROW_STATE

Null constraint violated.

NULL value cannot be inserted into non-null column %s at table %s.

ERRCODE_FDW_ERROR

RC_NULL_VIOLATION

Critical error.

Critical error: %s.

ERRCODE_FDW_ERROR

RC_PANIC

A checkpoint is in progress – cannot truncate table.

ERRCODE_FDW_OPERATION_NOT_SUPPORTED

RC_NA

Unknown error has occurred.

ERRCODE_FDW_ERROR

RC_MAX_VALUE

<recovery message>

-

ERRCODE_CONFIG_FILE_ERROR

<recovery message>

-

ERRCODE_INVALID_TABLE_

DEFINITION

Memory engine – Failed to perform commit prepared.

-

ERRCODE_INVALID_TRANSACTION_

STATE

Invalid option <option name>

-

ERRCODE_FDW_INVALID_OPTION_

NAME

Invalid memory allocation request size.

-

ERRCODE_INVALID_PARAMETER_

VALUE

Memory is temporarily unavailable.

-

ERRCODE_OUT_OF_LOGICAL_

MEMORY

Could not serialize access due to concurrent update.

-

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

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

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

-

ERRCODE_OUT_OF_LOGICAL_

MEMORY

Feedback
编组 3备份
    openGauss 2025-04-28 22:42:03
    cancel