# v1.2 正式发布、v1.3 Beta、Trace V2 与默认开启的 Native Histogram｜Greptime 月度精选 - No. 88

Source: https://greptime.cn/blogs/2026-09-30-greptimedb-monthly-report

## 内容概述

*2026 年 9 月 · 2026-09-01 – 2026-09-30*

本月主要更新：

- GreptimeDB v1.2.0 正式发布，v1.2.1 修复了 JSON2 在手动 compaction 时可能丢失数据的问题，v1.3.0-beta.1 已发布。
- Trace V2 将 OTLP span 属性存入 JSON2 列，支持 Jaeger 查询和 Semantic Graph。
- Prometheus Remote Write v2 和 OTLP 的 native histogram 写入默认启用，无需开关。

GreptimeDB [v1.2.0](https://github.com/GreptimeTeam/greptimedb/releases/tag/v1.2.0) 于 9 月 8 日正式发布，包含结构化 JSON2 类型、Prometheus Remote Write v2 和 Splunk HEC 写入（[发布博客](/blogs/2026-09-08-greptimedb-v1-2-0-release)）。从 v1.1 升级前，需要确认三项不兼容变更：standalone 模式下本地 `COPY` 和外部表路径被限制在 copy root 内，分布式模式下直接禁用（[迁移指南](https://docs.greptime.cn/user-guide/deployments-administration/migrate-local-sql-file-access)）；`holt_winters` 已移除，改用 `double_exponential_smoothing`；使用早期 JSON2 类型的非 Append Only 表在 flush 或 compaction 时可能失败，升级前请用有代表性的数据测试。

[v1.2.1](https://github.com/GreptimeTeam/greptimedb/releases/tag/v1.2.1) 于 9 月 16 日发布，修复了 JSON2 表读取 Parquet 统计信息时取错列的问题：带时间范围的查询可能返回错误结果，手动触发的 strict-window compaction（SWCS）可能丢失数据（[db#9129](https://github.com/GreptimeTeam/greptimedb/pull/9129)），常规的自动 compaction 不受影响。此外还修复了 compaction 中 JSON2 混合类型的处理（[db#9135](https://github.com/GreptimeTeam/greptimedb/pull/9135)）、repartition 之后 `count(*)` 结果错误的问题（[db#9154](https://github.com/GreptimeTeam/greptimedb/pull/9154)），以及 PromQL rate 窗口跨 counter reset 的计算问题（[db#9089](https://github.com/GreptimeTeam/greptimedb/pull/9089)）。使用 JSON2 列的 v1.2.0 用户请尽快升级。

[v1.3.0-beta.1](https://github.com/GreptimeTeam/greptimedb/releases/tag/v1.3.0-beta.1) 于 9 月 29 日发布，包含下文的 Trace V2、native histogram 和 compaction 改动，另有一个实验性的 series index，不建议用于生产环境。试用前需要确认：

- 查询引擎升级到 DataFusion 55.1.0（[db#8555](https://github.com/GreptimeTeam/greptimedb/pull/8555)、[db#9177](https://github.com/GreptimeTeam/greptimedb/pull/9177)）。整数输入的 `median`、`approx_median` 和 `approx_percentile_cont` 改为返回浮点数，`REPLACE(s, '', replacement)` 原样返回 `s`，struct `unnest` 生成的列名也有变化。结果 schema 固定的视图和 Flow sink 需要检查。
- JSON2 类型提示不再支持 `nullable` 和 `default`，需要从 DDL 和 pipeline 配置中删除（[db#9213](https://github.com/GreptimeTeam/greptimedb/pull/9213)）。
- 流式 Flow 现在只接受单源表的 projection 和 filter 查询（[db#8976](https://github.com/GreptimeTeam/greptimedb/pull/8976)）。源表为 `ttl = 'instant'` 时，含聚合的 `CREATE FLOW` 会被拒绝；不含聚合的 join 也会被拒绝。源表有持久化数据时，聚合查询仍以 batching Flow 运行。升级前请检查现有 Flow 是否属于这几类。

## 贡献者

过去一个月，共有 **24 位贡献者**合并了 **285 个 PR**。其中 **11 位社区贡献者**贡献了 **18 个 PR**。
欢迎新贡献者：**[@Tyagiquamar](https://github.com/Tyagiquamar)**、**[@DeviousCardi](https://github.com/DeviousCardi)**、**[@lczllx](https://github.com/lczllx)**、**[@Minghan2005](https://github.com/Minghan2005)**、**[@houyuwushang](https://github.com/houyuwushang)**、**[@sainad2222](https://github.com/sainad2222)**、**[@immanuwell](https://github.com/immanuwell)**、**[@LiuQhahah](https://github.com/LiuQhahah)**！

感谢本月提交代码的社区贡献者：

- **[@dhruvxvaishnav](https://github.com/dhruvxvaishnav)** *[db#9286](https://github.com/GreptimeTeam/greptimedb/pull/9286)* *[db#9191](https://github.com/GreptimeTeam/greptimedb/pull/9191)* *[db#9130](https://github.com/GreptimeTeam/greptimedb/pull/9130)* *[db#8941](https://github.com/GreptimeTeam/greptimedb/pull/8941)* *[db#8896](https://github.com/GreptimeTeam/greptimedb/pull/8896)*
- **[@Tyagiquamar](https://github.com/Tyagiquamar)** *[db#9059](https://github.com/GreptimeTeam/greptimedb/pull/9059)* *[db#9058](https://github.com/GreptimeTeam/greptimedb/pull/9058)* *[db#9032](https://github.com/GreptimeTeam/greptimedb/pull/9032)*
- **[@DeviousCardi](https://github.com/DeviousCardi)** *[db#9365](https://github.com/GreptimeTeam/greptimedb/pull/9365)* *[db#9364](https://github.com/GreptimeTeam/greptimedb/pull/9364)*
- **[@lczllx](https://github.com/lczllx)** *[db#9374](https://github.com/GreptimeTeam/greptimedb/pull/9374)*
- **[@houyuwushang](https://github.com/houyuwushang)** *[db#9295](https://github.com/GreptimeTeam/greptimedb/pull/9295)*
- **[@lyang24](https://github.com/lyang24)** *[db#9148](https://github.com/GreptimeTeam/greptimedb/pull/9148)*
- **[@immanuwell](https://github.com/immanuwell)** *[db#9142](https://github.com/GreptimeTeam/greptimedb/pull/9142)*
- **[@sainad2222](https://github.com/sainad2222)** *[db#9060](https://github.com/GreptimeTeam/greptimedb/pull/9060)*
- **[@LiuQhahah](https://github.com/LiuQhahah)** *[db#8967](https://github.com/GreptimeTeam/greptimedb/pull/8967)*
- **[@Xuanwo](https://github.com/Xuanwo)** *[db#8742](https://github.com/GreptimeTeam/greptimedb/pull/8742)*
- **[@Minghan2005](https://github.com/Minghan2005)** *[db#8701](https://github.com/GreptimeTeam/greptimedb/pull/8701)*

## PR 亮点

### [db#9192](https://github.com/GreptimeTeam/greptimedb/pull/9192) feat(otlp): add trace v2 ingestion with JSON2 attributes

Trace V2 是 OTLP trace 的新存储模型，需显式启用。`greptime_trace_v2` pipeline 把 span、scope 和 resource 属性分别存入三个 JSON2 列，不再为每个属性 key 单独建列。在 OTLP trace 请求上设置 `x-greptime-pipeline-name: greptime_trace_v2` 请求头启用，目标表需要与 Trace V1 的表分开。属性可按路径查询并转换类型：

```sql
SELECT
    trace_id,
    span_attributes."http.status_code"::BIGINT AS http_status,
    resource_attributes."service.name"::STRING AS service_name
FROM traces_v2;
```

Jaeger 查询和 Semantic Graph 推导都已支持新模型（[db#9257](https://github.com/GreptimeTeam/greptimedb/pull/9257)、[db#9278](https://github.com/GreptimeTeam/greptimedb/pull/9278)），span 的 events 和 links 以 JSON 数组保存（[db#9232](https://github.com/GreptimeTeam/greptimedb/pull/9232)）。已有的 Trace V1 表不会自动迁移。JSON2 类型的介绍见 [JSON2 深度解析](/blogs/2026-09-23-greptimedb-json2-deep-dive)。

### [db#9301](https://github.com/GreptimeTeam/greptimedb/pull/9301) feat: enable native histogram ingestion by default

Prometheus Remote Write v2 的 native histogram 和累积类型的 OTLP/HTTP 指数直方图写入默认启用，无需开关。查询部分见 8 月月报。Prometheus 侧需要选择 Remote Write 2.0：

```yaml
remote_write:
  - url: http://localhost:4000/v1/prometheus/write?db=public
    protobuf_message: io.prometheus.write.v2.Request
```

`experimental_enable_prometheus_native_histogram` 和 `experimental_enable_exponential_histogram` 两个配置项已移除，即使显式设为 `false` 也会被忽略。Remote Write v1 的 native histogram、native histogram 的 Remote Read 以及 OTel Arrow 指数直方图仍不支持。

### [db#9165](https://github.com/GreptimeTeam/greptimedb/pull/9165) feat: use exact sequence ranges for incremental Flow reads

Batching Flow 可增量计算的聚合范围扩大，每轮只处理上次运行之后写入的数据，不重算全量快照。源表为 Append Only 表并开启新的 `preserve_row_sequence` 选项后（[db#8865](https://github.com/GreptimeTeam/greptimedb/pull/8865)），Flow 能精确读取 checkpoint 之后写入的行，已经 flush 的数据也包括在内。HLL、UDDSketch、`stddev_state` 和 `avg_state` 产生的聚合状态列，会与 sink 中已有的状态合并（[db#9168](https://github.com/GreptimeTeam/greptimedb/pull/9168)、[db#9235](https://github.com/GreptimeTeam/greptimedb/pull/9235)）。

`EVAL OFFSET` 用于指定定时 Flow 在周期内的执行时间点。`EVAL INTERVAL '1 hour' EVAL OFFSET '17 minutes'` 在每小时第 17 分钟（UTC）运行，不受创建时间和重试影响（[db#8878](https://github.com/GreptimeTeam/greptimedb/pull/8878)）。

### [db#9224](https://github.com/GreptimeTeam/greptimedb/pull/9224) feat(query): implement PromQL @ modifier on vector and matrix selectors

PromQL 支持了 `@` modifier。此前 `some_metric @ 300` 能通过解析，但返回的是随 step 变化的值，不是固定时间点的样本。绝对时间戳、`@ start()`、`@ end()` 以及 `@` 与 `offset` 组合的语义都与 Prometheus 一致。

其他 PromQL 改动降低了查询开销。时间索引精度为秒或毫秒时，instant 查询只读取每条序列的最后一行（[db#9034](https://github.com/GreptimeTeam/greptimedb/pull/9034)）。二元运算或分组 join 一侧的 label matcher 会下推到另一侧的扫描（[db#9202](https://github.com/GreptimeTeam/greptimedb/pull/9202)、[db#9280](https://github.com/GreptimeTeam/greptimedb/pull/9280)）。range 查询的响应改为逐批构建，不再把全部结果留在内存中（[db#9229](https://github.com/GreptimeTeam/greptimedb/pull/9229)）；构建响应时也省去了一次输出排序，并推迟了数值格式化（[db#9090](https://github.com/GreptimeTeam/greptimedb/pull/9090)、[db#9091](https://github.com/GreptimeTeam/greptimedb/pull/9091)、[db#9092](https://github.com/GreptimeTeam/greptimedb/pull/9092)）。

### 其他更新

- Object store WAL 正在开发中（[RFC](https://github.com/GreptimeTeam/greptimedb/pull/9195)）。配置 `[wal] provider = "experimental_object_store"` 后，standalone 实例可以把 WAL 放在对象存储上（[db#9386](https://github.com/GreptimeTeam/greptimedb/pull/9386)）。目前为实验功能，仅支持 standalone，未包含在 v1.3.0-beta.1 中。
- Compaction 的多路归并改用 tournament tree，减少合并重叠文件时的比较次数。TWCS 对活跃和非活跃时间窗口分别设置文件数阈值。`compaction.twcs.trigger_file_num` 仍可用，作为 `compaction.twcs.active_window.trigger_file_num` 的别名（[db#8989](https://github.com/GreptimeTeam/greptimedb/pull/8989)、[db#9064](https://github.com/GreptimeTeam/greptimedb/pull/9064)、[db#9011](https://github.com/GreptimeTeam/greptimedb/pull/9011)）。
- MySQL 和 PostgreSQL 客户端可以使用 bearer token 认证：用户名填 `*`，密码填 token。需要 user provider 支持 token 校验（[db#8899](https://github.com/GreptimeTeam/greptimedb/pull/8899)）。
- 社区贡献：基于 OpenDAL 原生 HDFS 客户端的 HDFS 对象存储后端 `type = "Hdfs"`（[db#8701](https://github.com/GreptimeTeam/greptimedb/pull/8701)）；对于建表时使用 Raft Engine 或 Kafka WAL 的表，`ALTER TABLE ... SET 'skip_wal' = 'false'` 可以重新启用 WAL（[db#9130](https://github.com/GreptimeTeam/greptimedb/pull/9130)）；gRPC-Web 支持 CORS，通过 `[grpc] enable_cors` 开启（[db#9374](https://github.com/GreptimeTeam/greptimedb/pull/9374)）；`information_schema.region_statistics` 新增 `min_timestamp` 和 `max_timestamp`（[db#9060](https://github.com/GreptimeTeam/greptimedb/pull/9060)）。

## 生态更新

### Ingester

本月六个 ingester 新增 JSON2 写入：[Go v0.7.5](https://github.com/GreptimeTeam/greptimedb-ingester-go/releases/tag/v0.7.5)、[Java v0.16.0](https://github.com/GreptimeTeam/greptimedb-ingester-java/releases/tag/v0.16.0)、[Rust v0.19.0](https://github.com/GreptimeTeam/greptimedb-ingester-rust/releases/tag/v0.19.0)、[TypeScript v0.3.0](https://github.com/GreptimeTeam/greptimedb-ingester-ts/releases/tag/v0.3.0)、[.NET v0.4.0](https://github.com/GreptimeTeam/greptimedb-ingester-dotnet/releases/tag/v0.4.0) 和 [Erlang v0.3.0](https://github.com/GreptimeTeam/greptimedb-ingester-erl/releases/tag/v0.3.0)。升级注意事项：

- Rust v0.19.0：TLS 改为按需启用，需要加密连接时请开启 `tls-ring` feature。
- Java v0.16.0：gRPC 升级到 1.78，默认开启 keepalive；bulk 写入的超时有了上限，超时的 stream 会被取消。
- .NET v0.4.0：JSON2 列需要 GreptimeDB 1.2.1 及以上版本，bulk 写入不支持 JSON2 列；可通过 `x-greptime-hints` 请求头传入写入 hints。
- Erlang v0.3.0：含 JSON2 列的表必须是 Append Only 表；`connect_timeout`、`request_timeout` 和 `health_check_timeout` 可配置。

### MCP Server

[v0.6.0](https://github.com/GreptimeTeam/greptimedb-mcp-server/releases/tag/v0.6.0) 要求 MCP Python SDK 2.x，依赖 v1 `FastMCP` API 的用户请停留在 v0.5.2。新增的 `search_table_semantics` 和 `query_semantic_graph` 工具用于按可观测性概念查找表、读取服务依赖图。语义图相关功能需要 GreptimeDB 1.3。

### Dashboard

[v0.13.15](https://github.com/GreptimeTeam/dashboard/releases/tag/v0.13.15) 随 v1.3.0-beta.1 一起发布，JSON 结果列新增隐藏 null 字段的开关，并修复了 metric 查询输入框溢出的问题。

### Helm Charts

[greptimedb-cluster 0.8.35](https://github.com/GreptimeTeam/helm-charts/releases/tag/greptimedb-cluster-0.8.35) 升级到 GreptimeDB v1.2.0，[greptimedb-cluster 0.8.36](https://github.com/GreptimeTeam/helm-charts/releases/tag/greptimedb-cluster-0.8.36) 和 [greptimedb-standalone 0.4.15](https://github.com/GreptimeTeam/helm-charts/releases/tag/greptimedb-standalone-0.4.15) 升级到 v1.2.1。

## Good First Issues

以下 issue 适合首次贡献，在 issue 下留言即可认领。

### [Issue#7603](https://github.com/GreptimeTeam/greptimedb/issues/7603) Support WITH (timeout/wait) for DDL statements

目前只有 `ALTER TABLE` repartition 支持 `WITH (timeout = '...', wait = ...)`。该 issue 按语句拆分了子任务，如 `CREATE TABLE`、`DROP TABLE`、`CREATE FLOW` 和 `TRUNCATE TABLE`，可按语句分别认领。

关键词：SQL, DDL

难度：Medium

## 参与社区

- 文档：https://docs.greptime.cn
- GitHub：https://github.com/GreptimeTeam/greptimedb
- X：https://x.com/Greptime

有 bug 或功能需求，欢迎提 issue，也可以到社区群里交流。
