MOT错误消息

    • 服务器日志中报告的错误包括函数、实体、上下文、错误消息、错误描述和严重性。

    错误提示、错误描述和错误码见下文。该错误码实际上是内部代码,不记录也不返回给用户。

    所有错误都记录在数据库服务器日志文件中。以下列出了写入数据库服务器日志文件但未返回给用户的错误。该日志位于data文件夹中,命名为postgresql-DATE-TIME.log。

    表 1 只写入日志文件的错误

    返回给用户的错误

    下面列出了写入数据库服务器日志文件并返回给用户的错误。

    MOT使用返回码(Return Code,RC)返回Postgres标准错误代码至封装。某些RC会导致向正在与数据库交互的用户生成错误消息。

    MOT从内部返回Postgres代码(见下文)到数据库包,数据库封装根据标准的Postgres行为对其做出反应。

    表 2 返回给用户并记录到日志文件的错误

    返回给用户的短/长描述

    Postgres代码

    内部错误码

    Success.

    Denotes success

    ERRCODESUCCESSFUL

    COMPLETION

    RCOK = 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.

    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

    RCTABLE_EXCEEDS_MAX

    DECLAREDCOLS

    Cannot create index.

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

    ERRCODE_FDW_KEY_SIZE

    EXCEEDSMAX_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

    RCTABLE_EXCEEDS_MAX_INDEXES

    Cannot execute statement.

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

    ERRCODE_FDW_TOO_MANY

    DDLCHANGES_IN

    TRANSACTIONNOT

    ALLOWED

    RCTXN_EXCEEDS_MAX_DDLS

    Unique constraint violation

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

    Key %s already exists.

    ERRCODE_UNIQUE

    VIOLATION

    RCUNIQUE_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

    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.

    -

    ERRCODEINVALID_TRANSACTION

    STATE

    Invalid option <option name>

    -

    ERRCODEFDW_INVALID_OPTION

    NAME

    Invalid memory allocation request size.

    -

    ERRCODEINVALID_PARAMETER

    VALUE

    Memory is temporarily unavailable.

    -

    ERRCODEOUT_OF_LOGICAL

    MEMORY

    Could not serialize access due to concurrent update.

    -

    ERRCODET_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.

    -

    ERRCODEFDW_OPERATION_NOT

    SUPPORTED

    Allocation of table metadata failed.

    -

    ERRCODEOUT_OF_MEMORY

    Database with OID %u does not exist.

    -

    ERRCODE_UNDEFINED_DATABASE

    Value exceeds maximum precision: %d.

    -

    ERRCODE_NUMERIC_VALUE_OUT

    OFRANGE

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

    -

    ERRCODE_OUT_OF_LOGICAL

    MEMORY