

 从补丁 198 开始，Amazon Redshift 将不再支持创建新的 Python UDF。现有的 Python UDF 将继续正常运行至 2026 年 6 月 30 日。有关更多信息，请参阅[博客文章](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/)。

# 安全日志记录
<a name="db-auditing-secure-logging"></a>

如果 Amazon Redshift 记录引用一个或多个 AWS Glue Data Catalog 视图的查询，则 Amazon Redshift 在记录有关该查询的元数据时，会自动屏蔽某些系统表列和视图列中的字段。

安全日志屏蔽适用于 Amazon Redshift 在运行符合屏蔽条件的查询时生成的所有系统表和视图条目。下表列出了应用了安全日志记录、用 `******` 屏蔽文本和用 `-1` 屏蔽数字的系统视图和列。用于屏蔽文本的星号数量与原始文本中的字符数相匹配，最多 6 个字符。长度超过 6 个字符的字符串仍显示为 6 个星号。


****  

| 系统表 | 敏感列 | 
| --- | --- | 
| [SYS\_EXTERNAL\_QUERY\_DETAIL](https://docs.aws.amazon.com/redshift/latest/dg/SYS_EXTERNAL_QUERY_DETAIL.html) | **列：**source\_type、total\_partitions、qualified\_partitions、scanned\_files、returned\_rows、returned\_bytes、file\_format、file\_location、external\_query\_text、warning\_message。 | 
| [SYS\_EXTERNAL\_QUERY\_ERROR](https://docs.aws.amazon.com/redshift/latest/dg/SYS_EXTERNAL_QUERY_ERROR.html) | **列：**file\_location、rowid、column\_name、original\_value、modified\_value、trigger、action、action\_value、error\_code。 | 
| [SYS\_QUERY\_DETAIL](https://docs.aws.amazon.com/redshift/latest/dg/SYS_QUERY_DETAIL.html) | **列：**step\_id、step\_name、table\_id、table\_name、input\_bytes、input\_rows、output\_bytes、output\_rows、blocks\_read、blocks\_write、local\_read\_IO、remote\_read\_IO、spilled\_block\_local\_disk、spilled\_block\_remote\_disk、step\_attribute。 | 
| [SYS\_QUERY\_HISTORY](https://docs.aws.amazon.com/redshift/latest/dg/SYS_QUERY_HISTORY.html) | **列：**returned\_rows、returned\_bytes。 | 
| [STL\_AGGR](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_AGGR.html) | **列：**rows、bytes、tbl、type。 | 
| [STL\_BCAST](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_BCAST.html) | **列：**rows、bytes、packets。 | 
| [STL\_DDLTEXT](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_DDLTEXT.html) | **列：**label、text。 | 
| [STL\_DELETE](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_DELETE.html) | **列：**rows、tbl。 | 
| [STL\_DIST](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_DIST.html) | **列：**rows、bytes、packets。 | 
| [STL\_ERROR](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_ERROR.html) | **列：**file、linenum、context、error。 | 
| [STL\_EXPLAIN](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_EXPLAIN.html) | **列：**plannode、info。 | 
| [STL\_FILE\_SCAN](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_FILE_SCAN.html) | **列：**name、line、bytes。 | 
| [STL\_HASH](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_HASH.html) | **列：**rows、bytes、tbl、est\_rows。 | 
| [STL\_HASHJOIN](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_HASHJOIN.html) | **列：**rows、tbl、num\_parts、join\_type。 | 
| [STL\_INSERT](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_INSERT.html) | **列：**rows、tbl。 | 
| [STL\_LIMIT](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_LIMIT.html) | **列：**rows。 | 
| [STL\_MERGE](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_MERGE.html) | **列：**rows。 | 
| [STL\_MERGEJOIN](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_MERGEJOIN.html) | **列：**rows、tbl。 | 
| [STL\_NESTLOOP](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_NESTLOOP.html) | **列：**rows、tbl。 | 
| [STL\_PARSE](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_PARSE.html) | **列：**rows。 | 
| [STL\_PLAN\_INFO](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_PLAN_INFO.html) | **列：**startupcost、totalcost、rows、bytes。 | 
| [STL\_PROJECT](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_PROJECT.html) | **列：**rows、tbl。 | 
| [STL\_QUERY](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_QUERY.html) | **列：**querytxt。 | 
| [STL\_QUERY\_METRICS](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_QUERY_METRICS.html) | **列：**max\_rows、rows、max\_blocks\_read、blocks\_read、max\_blocks\_to\_disk、blocks\_to\_disk、max\_query\_scan\_size、query\_scan\_size。 | 
| [STL\_QUERYTEXT](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_QUERYTEXT.html) | **列：**text。 | 
| [STL\_RETURN](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_RETURN.html) | **列：**rows、bytes。 | 
| [STL\_S3CLIENT](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_S3CLIENT.html) | **列：**bucket、key、transfer\_size、data\_size。 | 
| [STL\_S3CLIENT\_ERROR](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_S3CLIENT_ERROR.html) | **列：**bucket、key、error、transfer\_size。 | 
| [STL\_SAVE](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_SAVE.html) | **列：**rows、bytes、tbl。 | 
| [STL\_SCAN](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_SCAN.html) | **列：**rows、bytes、fetches、type、tbl、rows\_pre\_filter、rows\_pre\_user\_filter、perm\_table\_name、scanned\_mega\_value。 | 
| [STL\_SORT](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_SORT.html) | **列：**rows、bytes、tbl。 | 
| [STL\_SSHCLIENT\_ERROR](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_SSHCLIENT_ERROR) | **列：**ssh\_username、endpoint、command、error。 | 
| [STL\_TR\_CONFLICT](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_TR_CONFLICT.html) | **列：**table\_id。 | 
| [STL\_UNDONE](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_UNDONE.html) | **列：**table\_id。 | 
| [STL\_UNIQUE](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_UNIQUE.html) | **列：**rows、type、bytes。 | 
| [STL\_UTILITYTEXT](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_UTILITYTEXT.html) | **列：**label、text。 | 
| [STL\_WINDOW](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_WINDOW.html) | **列：**rows。 | 
| [STV\_BLOCKLIST](https://docs.aws.amazon.com/redshift/latest/dg/r_STV_BLOCKLIST.html) | **列：**col、tbl、num\_values、minvalue、maxvalue。 | 
| [STV\_EXEC\_STATE](https://docs.aws.amazon.com/redshift/latest/dg/r_STV_EXEC_STATE.html) | **列：**rows、bytes、label。 | 
| [STV\_INFLIGHT](https://docs.aws.amazon.com/redshift/latest/dg/r_STV_INFLIGHT.html) | **列：**label、text。 | 
| [STV\_LOCKS](https://docs.aws.amazon.com/redshift/latest/dg/r_STV_LOCKS.html) | **列：**table\_id。 | 
| [STV\_QUERY\_METRICS](https://docs.aws.amazon.com/redshift/latest/dg/r_STV_QUERY_METRICS.html) | **列：**rows、max\_rows、blocks\_read、max\_blocks\_read、max\_blocks\_to\_disk、blocks\_to\_disk、max\_query\_scan\_size、query\_scan\_size。 | 
| [STV\_STARTUP\_RECOVERY\_STATE](https://docs.aws.amazon.com/redshift/latest/dg/r_STV_STARTUP_RECOVERY_STATE.html) | **列：**table\_id、table\_name。 | 
| [STV\_TBL\_PERM](https://docs.aws.amazon.com/redshift/latest/dg/r_STV_TBL_PERM.html) | **列：**id、name、rows、sorted\_rows、temp、block\_count、query\_scan\_size。 | 
| [STV\_TBL\_TRANS](https://docs.aws.amazon.com/redshift/latest/dg/r_STV_TBL_TRANS.html) | **列：**id、rows、size。 | 
| [SVCS\_EXPLAIN](https://docs.aws.amazon.com/redshift/latest/dg/r_SVCS_EXPLAIN.html) | **列：**plannode、info。 | 
| [SVCS\_PLAN\_INFO](https://docs.aws.amazon.com/redshift/latest/dg/r_SVCS_PLAN_INFO.html) | **列：**rows、bytes。 | 
| [SVCS\_QUERY\_SUMMARY](https://docs.aws.amazon.com/redshift/latest/dg/r_SVCS_QUERY_SUMMARY.html) | **列：**step、rows、bytes、rate\_row、rate\_byte、label、rows\_pre\_filter。 | 
| [SVCS\_S3LIST](https://docs.aws.amazon.com/redshift/latest/dg/r_SVCS_S3LIST.html) | **列：**bucket、prefix、retrieved\_files、max\_file\_size、avg\_file\_size。 | 
| [SVCS\_S3LOG](https://docs.aws.amazon.com/redshift/latest/dg/r_SVCS_S3LOG.html) | **列：**message。 | 
| [SVCS\_S3PARTITION\_SUMMARY](https://docs.aws.amazon.com/redshift/latest/dg/r_SVCS_S3PARTITION_SUMMARY.html) | **列：**total\_partitions、qualified\_partitions、min\_assigned\_partitions、max\_assigned\_partitions、avg\_assigned\_partitions。 | 
| [SVCS\_S3QUERY\_SUMMARY](https://docs.aws.amazon.com/redshift/latest/dg/r_SVCS_S3QUERY_SUMMARY.html) | **列：**external\_table\_name、file\_format、s3\_scanned\_rows、s3\_scanned\_bytes、s3query\_returned\_rows、s3query\_returned\_bytes。 | 
| [SVL\_QUERY\_METRICS](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_QUERY_METRICS.html) | **列：**step\_label、scan\_row\_count、join\_row\_count、nested\_loop\_join\_row\_count、return\_row\_count、spectrum\_scan\_row\_count、spectrum\_scan\_size\_mb。 | 
| [SVL\_QUERY\_METRICS\_SUMMARY](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_QUERY_METRICS_SUMMARY.html) | **列：**step\_label、scan\_row\_count、join\_row\_count、nested\_loop\_join\_row\_count、return\_row\_count、spectrum\_scan\_row\_count、spectrum\_scan\_size\_mb。 | 
| [SVL\_QUERY\_REPORT](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_QUERY_REPORT.html) | **列：**rows、bytes、label、rows\_pre\_filter。 | 
| [SVL\_QUERY\_SUMMARY](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_QUERY_SUMMARY.html) | **列：**rows、bytes、rows\_pre\_filter。 | 
| [SVL\_S3LIST](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_S3LIST.html) | **列：**bucket、prefix、retrieved\_files、max\_file\_size、avg\_file\_size。 | 
| [SVL\_S3LOG](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_S3LOG.html) | **列：**message。 | 
| [SVL\_S3PARTITION](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_S3PARTITION.html) | **列：**rows、bytes、label、rows\_pre\_filter。 | 
| [SVL\_S3PARTITION\_SUMMARY](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_S3PARTITION_SUMMARY.html) | **列：**total\_partitions、qualified\_partitions、min\_assigned\_partitions、max\_assigned\_partitions、avg\_assigned\_partitions。 | 
| [SVL\_S3QUERY](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_S3QUERY.html) | **列：**external\_table\_name、file\_format、s3\_scanned\_rows、s3\_scanned\_bytes、s3query\_returned\_rows、s3query\_returned\_bytes、files。 | 
| [SVL\_S3QUERY\_SUMMARY](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_S3QUERY_SUMMARY.html) | **列：**external\_table\_name、file\_format、s3\_scanned\_rows、s3\_scanned\_bytes、s3query\_returned\_rows、s3query\_returned\_bytes。 | 
| [SVL\_S3RETRIES](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_S3RETRIES.html) | **列：**file\_size、location、message。 | 
| [SVL\_SPECTRUM\_SCAN\_ERROR](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_SPECTRUM_SCAN_ERROR.html) | **列：**location、rowid、colname、original\_value、modified\_value、trigger、action、action\_value、error\_code。 | 
| [SVL\_STATEMENTTEXT](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_STATEMENTTEXT.html) | **列：**type、text。 | 
| [SVL\_STORED\_PROC\_CALL](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_STORED_PROC_CALL.html) | **列：**querytxt。 | 
| [SVL\_STORED\_PROC\_MESSAGES](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_STORED_PROC_MESSAGES.html) | **列：**message、linenum、querytext。 | 
| [SVL\_UDF\_LOG](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_UDF_LOG.html) | **列：**message、funcname。 | 
| [SVV\_DISKUSAGE](https://docs.aws.amazon.com/redshift/latest/dg/r_SVV_DISKUSAGE.html) | **列：**name、col、tbl、blocknum、num\_values、minvalue、maxvalue。 | 
| [SVV\_QUERY\_STATE](https://docs.aws.amazon.com/redshift/latest/dg/r_SVV_QUERY_STATE.html) | **列：**rows、bytes、label。 | 
| [SVV\_TABLE\_INFO](https://docs.aws.amazon.com/redshift/latest/dg/r_SVV_TABLE_INFO.html) | **列：**table\_id、table。 | 
| [SVV\_TRANSACTIONS](https://docs.aws.amazon.com/redshift/latest/dg/r_SVV_TRANSACTIONS.html) | **列：**relation。 | 

有关系统表和视图的更多信息，请参阅《Amazon Redshift 数据库开发人员指南》**中的[系统表和视图参考](https://docs.aws.amazon.com/redshift/latest/dg/cm_chap_system-tables.html)。有关 Amazon Redshift 的动态屏蔽查询结果的功能的信息，请参阅《Amazon Redshift 数据库开发人员指南》**中的[动态数据掩蔽](https://docs.aws.amazon.com/redshift/latest/dg/t_ddm.html)。有关使用 Amazon Redshift 在 AWS Glue Data Catalog 中创建视图的信息，请参阅《Amazon Redshift 数据库开发人员指南》**中的 [AWS Glue Data Catalog 视图](https://docs.aws.amazon.com/redshift/latest/dg/data-catalog-views-overview.html)。