STL_ERROR - Amazon Redshift

STL_ERROR

Records internal processing errors generated by the Amazon Redshift database engine. STL_ERROR does not record SQL errors or messages. The information in STL_ERROR is useful for troubleshooting certain errors. An AWS support engineer might ask you to provide this information as part of the troubleshooting process.

STL_ERROR is visible to all users. Superusers can see all rows; regular users can see only their own data. For more information, see Visibility of data in system tables and views.

Some or all of the data in this table can also be found in the SYS monitoring view SYS_QUERY_HISTORY. The data in the SYS monitoring view is formatted to be easier to use and understand. We recommend that you use the SYS monitoring view for your queries.

For a list of error codes that can be generated while loading data with the Copy command, see Load error reference.

Table columns

Column name Data type Description
userid integer ID of the user who generated the entry.
process character(12) Process that threw the exception.
recordtime timestamp Time that the error occurred.
pid integer Process ID. The STL_QUERY table contains process IDs and unique query IDs for completed queries.
errcode integer Error code corresponding to the error category.
file character(90) Name of the source file where the error occurred.
linenum integer Line number in the source file where the error occurred.
context character(100) Cause of the error.
error character(512) Error message.

Sample queries

The following example retrieves the error information from STL_ERROR.

select process, errcode, linenum as line, trim(error) as err from stl_error; process | errcode | line | err --------------+---------+------+------------------------------------------------------------------ padbmaster | 8001 | 194 | Path prefix: s3://redshift-downloads/testnulls/venue.txt* padbmaster | 8001 | 529 | Listing bucket=redshift-downloads prefix=tests/category-csv-quotes padbmaster | 2 | 190 | database "template0" is not currently accepting connections padbmaster | 32 | 1956 | pq_flush: could not send data to client: Broken pipe (4 rows)