# 异常检测函数 & GC 管理支持｜Greptime 双周精选 - No. 78

Source: https://greptime.cn/blogs/2026-03-08-greptimedb-biweekly-report

## 6,000 GitHub Stars!

GreptimeDB 在 GitHub 上突破了 **6,000 stars**！感谢每一位关注和参与项目的朋友。

![6,000 GitHub Stars](/zh/blogs/2026-03-08-greptimedb-biweekly-report/6k_star.png)

## GreptimeDB v1.0.0-rc.2 发布

我们刚刚发布了 [GreptimeDB v1.0.0-rc.2](/blogs/2026-03-12-greptimedb-v1.0.0-rc2-release)。最大的亮点是 TopK 查询的动态过滤下推优化，特定场景下可带来**超过 100 倍**的性能提升。此外还包括 PostgreSQL COPY 支持、Prometheus 3.x 兼容性，以及若干 Repartition 稳定性修复。

## 内容概述

*开发周期：2026-02-23 - 2026-03-08*

近期主要更新：

- 新增三个 SQL 函数（`anomaly_score_zscore`、`anomaly_score_iqr`、`anomaly_score_mad`）用于检测时序数据中的异常值
- PostgreSQL 的 `COPY TO STDOUT` 现在可以用来导出数据了
- 管理命令 `ADMIN GC` 现在可以清理指定的表和 Region 了


## 贡献者

过去两周，共有 **11 位贡献者**合并了 **47 个 PR**。

## PR 亮点

### [db#7578](https://github.com/GreptimeTeam/greptimedb/pull/7578) chore: upgrade DataFusion family, again

DataFusion 上游已经升到 Arrow 58 了，我们暂时还没跟进，所以先升到 Arrow 58 之前的最后一个版本。sqlparser 也顺便升到了 v0.61.0。

### [db#7681](https://github.com/GreptimeTeam/greptimedb/pull/7681) feat: implements anomaly_score_iqr, anomaly_score_mad  etc.

新增了三个窗口函数用于异常检测：`anomaly_score_zscore()`、`anomaly_score_mad()` 和 `anomaly_score_iqr()`，分别使用 Z-Score、中位数绝对偏差和四分位数范围方法计算统计异常得分。这些函数会自动处理数据点不足或方差为零等边界情况，返回 NULL 或 +inf，让你在 SQL 查询中做异常检测时不用额外处理空值。

### [db#7619](https://github.com/GreptimeTeam/greptimedb/pull/7619) feat: admin gc table/regions

新增管理命令 `ADMIN GC TABLE` 和 `ADMIN GC REGION`，运维人员可以手动触发特定表或 Region 的垃圾回收，对存储清理操作有了更精细的控制。

### [db#7709](https://github.com/GreptimeTeam/greptimedb/pull/7709) feat: implement postgres copy to stdout

PostgreSQL 连接现在支持 `COPY (query) TO STDOUT WITH (format binary)`，ADBC-postgres 驱动可以用高效的 PGCOPY 二进制协议传输数据，比文本结果集更快。

### [db#7694](https://github.com/GreptimeTeam/greptimedb/pull/7694) fix(repartition): reject writes on deallocating regions during region merge

合并过程中，正在释放的 Region 现在会拒绝写入请求，避免多个 Region 合并成更少 Region 时出现数据不一致。


## Good First Issue

### [Issue#7755](https://github.com/GreptimeTeam/greptimedb/issues/7755) Feature request: Support EKS Pod Identity / ECS container credentials endpoint for S3 object storage

需要升级 GreptimeDB 的 OpenDAL 依赖版本，新版本支持 AWS 容器凭证端点，这样就能用 EKS Pod Identity 和 ECS 任务角色来认证。

- **关键词：** Storage, Dependencies
- **难度：** Easy

### [Issue#7544](https://github.com/GreptimeTeam/greptimedb/issues/7544) Allow ALTER TABLE to modify the skip_wal option dynamically

支持通过 ALTER TABLE SET 命令动态修改 skip_wal 表选项，让用户可以在运行时开启或关闭预写日志。

- **关键词：** SQL parser, Storage, WAL
- **难度：** Medium
