

# aurora\$1stat\$1reset\$1wal\$1cache
<a name="aurora_stat_reset_wal_cache"></a>

重置逻辑 wal 缓存的计数器。

## 语法
<a name="aurora_stat_reset_wal_cache-syntax"></a>

重置特定插槽

```
SELECT * FROM aurora_stat_reset_wal_cache('slot_name')
```

重置所有插槽

```
SELECT * FROM aurora_stat_reset_wal_cache(NULL)
```

## 参数
<a name="aurora_stat_reset_wal_cache-arguments"></a>

`NULL` 或 `slot_name`

## 返回类型
<a name="aurora_stat_reset_wal_cache-return-type"></a>

状态消息，文本字符串
+ 重置逻辑 wal 缓存计数器 – 成功消息。函数成功时将返回此文本。
+ 未找到复制插槽。请重试。– 失败消息。当函数不成功时，将返回此文本。

## 使用说明
<a name="aurora_stat_reset_wal_cache-usage-notes"></a>

此函数可用于以下版本。
+ Aurora PostgreSQL 14.5 及更高版本
+ Aurora PostgreSQL 版本 13.8 及更高版本
+ Aurora PostgreSQL 版本 12.12 及更高版本
+ Aurora PostgreSQL 版本 11.17 及更高版本

## 示例
<a name="aurora_stat_reset_wal_cache-examples"></a>

以下示例使用 `aurora_stat_reset_wal_cache` 函数重置名为 `test_results` 的插槽，然后尝试重置不存在的插槽。

```
=> SELECT * 
     FROM aurora_stat_reset_wal_cache('test_slot');
aurora_stat_reset_wal_cache
--------------------------------------
 Reset the logical wal cache counter.
(1 row)
=> SELECT * 
     FROM aurora_stat_reset_wal_cache('slot-not-exist');
aurora_stat_reset_wal_cache
-----------------------------------------------
 Replication slot not found. Please try again.
(1 row)
```