aurora_stat_logical_wal_cache - Amazon Aurora
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

aurora_stat_logical_wal_cache

显示每个插槽的逻辑预写日志(WAL)缓存使用情况。

语法

SELECT * FROM aurora_stat_logical_wal_cache()

Arguments

返回类型

包含以下列的 SETOF 记录:

  • name – 复制插槽的名称。

  • active_pid – walsender 进程的 ID。

  • cache_hit – 自上次重置以来的 wal 缓存命中总数。

  • cache_miss – 自上次重置以来的 wal 缓存未命中总数。

  • blks_read – wal 缓存读取请求的总数。

  • hit_rate – WAL 缓存命中率(cache_hit/blks_read)。

  • last_reset_timestamp – 上次重置计数器的时间。

使用说明

此函数可用于以下版本。

  • Aurora PostgreSQL 14.7

  • Aurora PostgreSQL 版本 13.8 及更高版本

  • Aurora PostgreSQL 版本 12.12 及更高版本

  • Aurora PostgreSQL 版本 11.17 及更高版本

示例

以下示例显示了两个仅具有一个活动的 aurora_stat_logical_wal_cache 函数的复制插槽。

=> SELECT * FROM aurora_stat_logical_wal_cache(); name | active_pid | cache_hit | cache_miss | blks_read | hit_rate | last_reset_timestamp ------------+------------+-----------+------------+-----------+----------+------------------------------- test_slot1 | 79183 | 24 | 0 | 24 | 100.00% | 2022-08-05 17:39:56.830635+00 test_slot2 | | 1 | 0 | 1 | 100.00% | 2022-08-05 17:34:04.036795+00 (2 rows)