openGauss MOT Error Messages

·

2 min read

Errors may be caused by a variety of scenarios. All errors are logged in the database server log file. In addition, user-related errors are returned to the user as part of the response to the query, transaction or stored procedure execution or to database administration action.

  • Errors reported in the Server log include – Function, Entity, Context, Error message, Error description and Severity.

  • Errors reported to users are translated into standard PostgreSQL error codes and may consist of an MOT-specific message and description.

The following lists the error messages, error descriptions and error codes. The error code is actually an internal code and not logged or returned to users.

Errors Written the Log File

All errors are logged in the database server log file. The following lists the errors that are written to the database server log file and are not returned to the user. The log is located in the data folder and named postgresql-DATE-TIME.log.

Table 1 Errors Written Only to the Log File

Message in the LogError Internal Code
Error code denoting successMOT_NO_ERROR 0
Out of memoryMOT_ERROR_OOM 1
Invalid configurationMOT_ERROR_INVALID_CFG 2
Invalid argument passed to functionMOT_ERROR_INVALID_ARG 3
System call failedMOT_ERROR_SYSTEM_FAILURE 4
Resource limit reachedMOT_ERROR_RESOURCE_LIMIT 5
Internal logic errorMOT_ERROR_INTERNAL 6
Resource unavailableMOT_ERROR_RESOURCE_UNAVAILABLE 7
Unique violationMOT_ERROR_UNIQUE_VIOLATION 8
Invalid memory allocation sizeMOT_ERROR_INVALID_MEMORY_SIZE 9
Index out of rangeMOT_ERROR_INDEX_OUT_OF_RANGE 10
Error code unknownMOT_ERROR_INVALID_STATE 11

Errors Returned to the User

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

MOT returns PG standard error codes to the envelope using a Return Code (RC). Some RCs cause the generation of an error message to the user who is interacting with the database.

The PG code (described below) is returned internally by MOT to the database envelope, which reacts to it according to standard PG behavior.

NOTE: %s, %u and %lu in the message are replaced by relevant error information, such as query, table name or another information.

  • %s – String

  • %u – Number

  • %lu – Number