From d3b4f90fdeea0df1f22cc43134dcf1d1e6dd5a8c Mon Sep 17 00:00:00 2001 From: WenyXu Date: Wed, 26 Aug 2026 08:14:13 +0000 Subject: [PATCH 1/5] docs: document events schema reconciliation --- docs/reference/sql/greptime-private/events.md | 10 +++++++--- .../monitoring/events/overview.md | 6 +++++- .../current/reference/sql/greptime-private/events.md | 2 +- .../monitoring/events/overview.md | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/docs/reference/sql/greptime-private/events.md b/docs/reference/sql/greptime-private/events.md index 46308f7e3..9dc560635 100644 --- a/docs/reference/sql/greptime-private/events.md +++ b/docs/reference/sql/greptime-private/events.md @@ -11,9 +11,13 @@ with Metasrv can additionally record operational event types. Event recording is asynchronous and best-effort, so rows are not an acknowledgement that an operation succeeded. -The table is created when the first event is recorded. If no event has been -recorded, or event recording is disabled, querying it returns a table-not-found -error. Configure recording in [Event recording](/user-guide/deployments-administration/configuration.md#event-recording). +The first event creates the internal `greptime.greptime_private.events` table, even +when the server-side global `auto_create_table` setting is `false`. When an existing +events table is missing columns from the current event schema, recording an event +adds the missing columns. This exception applies only to the internal events table; +`auto_create_table=false` still prevents automatic creation and schema changes for +user tables. If no event has been recorded, or event recording is disabled, +querying it returns a table-not-found error. Configure recording in [Event recording](/user-guide/deployments-administration/configuration.md#event-recording). ```sql USE greptime_private; diff --git a/docs/user-guide/deployments-administration/monitoring/events/overview.md b/docs/user-guide/deployments-administration/monitoring/events/overview.md index d495a4fc8..0a17a513c 100644 --- a/docs/user-guide/deployments-administration/monitoring/events/overview.md +++ b/docs/user-guide/deployments-administration/monitoring/events/overview.md @@ -18,7 +18,11 @@ See [Event recording](/user-guide/deployments-administration/configuration.md#ev ## Query events -The table is created when the first event is recorded. If no event has been +The first event creates the internal `greptime.greptime_private.events` table, even +when the server-side global `auto_create_table` setting is `false`. Recording an event +also adds columns missing from an existing events table. This exception applies +only to the internal events table; `auto_create_table=false` still prevents +automatic creation and schema changes for user tables. If no event has been recorded yet, or event recording is disabled, this query returns a table-not-found error. diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/events.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/events.md index d754eb026..b131a77ba 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/events.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/events.md @@ -7,7 +7,7 @@ description: greptime_private 数据库中的 events 表。 `events` 表保存 GreptimeDB 运行期间产生的事件。单机部署记录受支持的本地 DDL Procedure 事件;带有 Metasrv 的分布式部署还可以记录运维事件。事件会异步写入,写入失败不会影响原操作的执行结果。因此,不能以事件是否出现作为操作成功的依据。 -该表会在首次记录事件时自动创建。如果还没有事件记录,或已禁用事件记录,查询会提示表不存在。配置方法请参阅[事件记录配置](/user-guide/deployments-administration/configuration.md#事件记录配置)。 +即使服务端全局 `auto_create_table` 配置为 `false`,首次记录事件仍会创建内部的 `greptime.greptime_private.events` 表。若现有 events 表缺少当前事件表结构中的列,记录事件时会补齐这些列。该例外只适用于内部 events 表;`auto_create_table=false` 仍会阻止用户表自动创建和自动变更表结构。尚未记录任何事件,或已禁用事件记录时,查询会提示表不存在。配置方法请参阅[事件记录配置](/user-guide/deployments-administration/configuration.md#事件记录配置)。 ```sql USE greptime_private; diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/events/overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/events/overview.md index 487ea243b..8d8c43064 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/events/overview.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/events/overview.md @@ -15,7 +15,7 @@ GreptimeDB 会异步写入事件记录,通常每 5 秒刷新一次。刚完成 ## 查询事件 -事件表会在首次记录事件时创建。尚未记录任何事件,或已禁用事件记录时,下面的查询会报表不存在。 +即使服务端全局 `auto_create_table` 配置为 `false`,首次记录事件仍会创建内部的 `greptime.greptime_private.events` 表。记录事件还会补齐现有 events 表缺少的列。该例外只适用于内部 events 表;`auto_create_table=false` 仍会阻止用户表自动创建和自动变更表结构。尚未记录任何事件,或已禁用事件记录时,下面的查询会报表不存在。 排查最近的操作时,可以先查询最近一小时的事件,并将结果限制为 20 条: From 94543596e6e833b35fafee27703f7d8e1cb69c7e Mon Sep 17 00:00:00 2001 From: WenyXu Date: Mon, 31 Aug 2026 07:21:29 +0000 Subject: [PATCH 2/5] docs: document private system table auto-create exemptions --- docs/reference/sql/greptime-private/events.md | 17 ++++++++++------- .../sql/greptime-private/slow_queries.md | 4 ++++ .../monitoring/events/overview.md | 16 +++++++++------- .../reference/sql/greptime-private/events.md | 2 +- .../sql/greptime-private/slow_queries.md | 1 + .../monitoring/events/overview.md | 2 +- 6 files changed, 26 insertions(+), 16 deletions(-) diff --git a/docs/reference/sql/greptime-private/events.md b/docs/reference/sql/greptime-private/events.md index 9dc560635..1f2aff2fe 100644 --- a/docs/reference/sql/greptime-private/events.md +++ b/docs/reference/sql/greptime-private/events.md @@ -11,13 +11,16 @@ with Metasrv can additionally record operational event types. Event recording is asynchronous and best-effort, so rows are not an acknowledgement that an operation succeeded. -The first event creates the internal `greptime.greptime_private.events` table, even -when the server-side global `auto_create_table` setting is `false`. When an existing -events table is missing columns from the current event schema, recording an event -adds the missing columns. This exception applies only to the internal events table; -`auto_create_table=false` still prevents automatic creation and schema changes for -user tables. If no event has been recorded, or event recording is disabled, -querying it returns a table-not-found error. Configure recording in [Event recording](/user-guide/deployments-administration/configuration.md#event-recording). +When the event recorder writes its first event, it creates the +`greptime_private.events` system table. During internal writes, this table, +`greptime_private.slow_queries`, and `greptime_private.region_statistics_history` +may be created or additively reconciled when automatic table creation is disabled +by the server-side global setting or a request-level `auto_create_table` hint. +An entry in the whitelist does not apply to other tables in the same write +request. +For `events`, reconciliation adds columns missing from the current event schema. If +no event has been recorded, or event recording is disabled, querying it returns a +table-not-found error. Configure recording in [Event recording](/user-guide/deployments-administration/configuration.md#event-recording). ```sql USE greptime_private; diff --git a/docs/reference/sql/greptime-private/slow_queries.md b/docs/reference/sql/greptime-private/slow_queries.md index 98aaccac4..6c05deee5 100644 --- a/docs/reference/sql/greptime-private/slow_queries.md +++ b/docs/reference/sql/greptime-private/slow_queries.md @@ -6,6 +6,10 @@ description: The slow queries table in the `greptime_private` database. # slow_queries The `slow_queries` table records SQL and PromQL queries selected by the slow-query recorder. +When the slow-query recorder writes to this table, it may create or additively +reconcile it even when automatic table creation is disabled by the server-side +global setting or a request-level `auto_create_table` hint. An entry in the +whitelist does not apply to other tables in the same write request. :::tip NOTE The `slow_queries` table requires slow query logging to be enabled. See [Slow Query](/user-guide/deployments-administration/monitoring/slow-query.md) for configuration details. diff --git a/docs/user-guide/deployments-administration/monitoring/events/overview.md b/docs/user-guide/deployments-administration/monitoring/events/overview.md index 0a17a513c..6e7681b6c 100644 --- a/docs/user-guide/deployments-administration/monitoring/events/overview.md +++ b/docs/user-guide/deployments-administration/monitoring/events/overview.md @@ -18,13 +18,15 @@ See [Event recording](/user-guide/deployments-administration/configuration.md#ev ## Query events -The first event creates the internal `greptime.greptime_private.events` table, even -when the server-side global `auto_create_table` setting is `false`. Recording an event -also adds columns missing from an existing events table. This exception applies -only to the internal events table; `auto_create_table=false` still prevents -automatic creation and schema changes for user tables. If no event has been -recorded yet, or event recording is disabled, this query returns a table-not-found -error. +When the event recorder writes its first event, it creates the +`greptime_private.events` system table. During internal writes, this table, +`greptime_private.slow_queries`, and `greptime_private.region_statistics_history` +may be created or additively reconciled when automatic table creation is disabled +by the server-side global setting or a request-level `auto_create_table` hint. +An entry in the whitelist does not apply to other tables in the same write +request. +If no event has been recorded yet, or event recording is disabled, this query +returns a table-not-found error. Start with a bounded query while investigating a recent operation: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/events.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/events.md index b131a77ba..aa9ca470a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/events.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/events.md @@ -7,7 +7,7 @@ description: greptime_private 数据库中的 events 表。 `events` 表保存 GreptimeDB 运行期间产生的事件。单机部署记录受支持的本地 DDL Procedure 事件;带有 Metasrv 的分布式部署还可以记录运维事件。事件会异步写入,写入失败不会影响原操作的执行结果。因此,不能以事件是否出现作为操作成功的依据。 -即使服务端全局 `auto_create_table` 配置为 `false`,首次记录事件仍会创建内部的 `greptime.greptime_private.events` 表。若现有 events 表缺少当前事件表结构中的列,记录事件时会补齐这些列。该例外只适用于内部 events 表;`auto_create_table=false` 仍会阻止用户表自动创建和自动变更表结构。尚未记录任何事件,或已禁用事件记录时,查询会提示表不存在。配置方法请参阅[事件记录配置](/user-guide/deployments-administration/configuration.md#事件记录配置)。 +事件记录器首次写入事件时会创建 `greptime_private.events` 系统表。此表以及 `greptime_private.slow_queries` 和 `greptime_private.region_statistics_history` 都是内部系统表;即使服务端全局配置或请求级 `auto_create_table` hint 禁用了自动建表,内部写入仍可创建这些表并以添加缺失列的方式协调表结构。白名单中的表不会使同一写入请求中的其他表获得此例外。对于 `events`,协调会补齐当前事件表结构中缺少的列。尚未记录任何事件,或已禁用事件记录时,查询会提示表不存在。配置方法请参阅[事件记录配置](/user-guide/deployments-administration/configuration.md#事件记录配置)。 ```sql USE greptime_private; diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/slow_queries.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/slow_queries.md index 3ccfb09cd..dd5531c0c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/slow_queries.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/slow_queries.md @@ -6,6 +6,7 @@ description: greptime_private 数据库中的慢查询表。 # slow_queries `slow_queries` 表记录被慢查询记录器选中的 SQL 和 PromQL 查询。 +慢查询记录器写入此表时,即使服务端全局配置或请求级 `auto_create_table` hint 禁用了自动建表,仍可创建此表并以添加缺失列的方式协调其表结构。白名单中的表不会使同一写入请求中的其他表获得此例外。 :::tip 注意 `slow_queries` 表需要开启慢查询日志功能。详见[慢查询](/user-guide/deployments-administration/monitoring/slow-query.md)配置说明。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/events/overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/events/overview.md index 8d8c43064..6b3652d26 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/events/overview.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/events/overview.md @@ -15,7 +15,7 @@ GreptimeDB 会异步写入事件记录,通常每 5 秒刷新一次。刚完成 ## 查询事件 -即使服务端全局 `auto_create_table` 配置为 `false`,首次记录事件仍会创建内部的 `greptime.greptime_private.events` 表。记录事件还会补齐现有 events 表缺少的列。该例外只适用于内部 events 表;`auto_create_table=false` 仍会阻止用户表自动创建和自动变更表结构。尚未记录任何事件,或已禁用事件记录时,下面的查询会报表不存在。 +事件记录器首次写入事件时会创建 `greptime_private.events` 系统表。此表以及 `greptime_private.slow_queries` 和 `greptime_private.region_statistics_history` 都是内部系统表;即使服务端全局配置或请求级 `auto_create_table` hint 禁用了自动建表,内部写入仍可创建这些表并以添加缺失列的方式协调表结构。白名单中的表不会使同一写入请求中的其他表获得此例外。尚未记录任何事件,或已禁用事件记录时,下面的查询会报表不存在。 排查最近的操作时,可以先查询最近一小时的事件,并将结果限制为 20 条: From 0b536b30f3aa9dd0482d165038a7fca6986f4790 Mon Sep 17 00:00:00 2001 From: WenyXu Date: Mon, 31 Aug 2026 08:06:33 +0000 Subject: [PATCH 3/5] docs: document events and slow query table reconciliation --- docs/reference/sql/greptime-private/events.md | 14 +++++--------- .../reference/sql/greptime-private/slow_queries.md | 7 +++---- .../monitoring/events/overview.md | 12 ++++-------- .../reference/sql/greptime-private/events.md | 2 +- .../reference/sql/greptime-private/slow_queries.md | 2 +- .../monitoring/events/overview.md | 2 +- 6 files changed, 15 insertions(+), 24 deletions(-) diff --git a/docs/reference/sql/greptime-private/events.md b/docs/reference/sql/greptime-private/events.md index 1f2aff2fe..794507647 100644 --- a/docs/reference/sql/greptime-private/events.md +++ b/docs/reference/sql/greptime-private/events.md @@ -12,15 +12,11 @@ asynchronous and best-effort, so rows are not an acknowledgement that an operation succeeded. When the event recorder writes its first event, it creates the -`greptime_private.events` system table. During internal writes, this table, -`greptime_private.slow_queries`, and `greptime_private.region_statistics_history` -may be created or additively reconciled when automatic table creation is disabled -by the server-side global setting or a request-level `auto_create_table` hint. -An entry in the whitelist does not apply to other tables in the same write -request. -For `events`, reconciliation adds columns missing from the current event schema. If -no event has been recorded, or event recording is disabled, querying it returns a -table-not-found error. Configure recording in [Event recording](/user-guide/deployments-administration/configuration.md#event-recording). +`greptime_private.events` system table. If an existing table is missing columns +from the current event schema, the recorder adds them. It performs both actions +even when automatic table creation is disabled. If no event has been recorded, or +event recording is disabled, querying it returns a table-not-found error. Configure +recording in [Event recording](/user-guide/deployments-administration/configuration.md#event-recording). ```sql USE greptime_private; diff --git a/docs/reference/sql/greptime-private/slow_queries.md b/docs/reference/sql/greptime-private/slow_queries.md index 6c05deee5..f354c7171 100644 --- a/docs/reference/sql/greptime-private/slow_queries.md +++ b/docs/reference/sql/greptime-private/slow_queries.md @@ -6,10 +6,9 @@ description: The slow queries table in the `greptime_private` database. # slow_queries The `slow_queries` table records SQL and PromQL queries selected by the slow-query recorder. -When the slow-query recorder writes to this table, it may create or additively -reconcile it even when automatic table creation is disabled by the server-side -global setting or a request-level `auto_create_table` hint. An entry in the -whitelist does not apply to other tables in the same write request. +When the slow-query recorder writes to `greptime_private.slow_queries`, it creates +the table if it does not exist and adds any missing columns to an existing table. +It performs both actions even when automatic table creation is disabled. :::tip NOTE The `slow_queries` table requires slow query logging to be enabled. See [Slow Query](/user-guide/deployments-administration/monitoring/slow-query.md) for configuration details. diff --git a/docs/user-guide/deployments-administration/monitoring/events/overview.md b/docs/user-guide/deployments-administration/monitoring/events/overview.md index 6e7681b6c..474b3fd30 100644 --- a/docs/user-guide/deployments-administration/monitoring/events/overview.md +++ b/docs/user-guide/deployments-administration/monitoring/events/overview.md @@ -19,14 +19,10 @@ See [Event recording](/user-guide/deployments-administration/configuration.md#ev ## Query events When the event recorder writes its first event, it creates the -`greptime_private.events` system table. During internal writes, this table, -`greptime_private.slow_queries`, and `greptime_private.region_statistics_history` -may be created or additively reconciled when automatic table creation is disabled -by the server-side global setting or a request-level `auto_create_table` hint. -An entry in the whitelist does not apply to other tables in the same write -request. -If no event has been recorded yet, or event recording is disabled, this query -returns a table-not-found error. +`greptime_private.events` system table. If an existing table is missing columns +from the current event schema, the recorder adds them. It performs both actions +even when automatic table creation is disabled. If no event has been recorded yet, +or event recording is disabled, this query returns a table-not-found error. Start with a bounded query while investigating a recent operation: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/events.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/events.md index aa9ca470a..ccea887a2 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/events.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/events.md @@ -7,7 +7,7 @@ description: greptime_private 数据库中的 events 表。 `events` 表保存 GreptimeDB 运行期间产生的事件。单机部署记录受支持的本地 DDL Procedure 事件;带有 Metasrv 的分布式部署还可以记录运维事件。事件会异步写入,写入失败不会影响原操作的执行结果。因此,不能以事件是否出现作为操作成功的依据。 -事件记录器首次写入事件时会创建 `greptime_private.events` 系统表。此表以及 `greptime_private.slow_queries` 和 `greptime_private.region_statistics_history` 都是内部系统表;即使服务端全局配置或请求级 `auto_create_table` hint 禁用了自动建表,内部写入仍可创建这些表并以添加缺失列的方式协调表结构。白名单中的表不会使同一写入请求中的其他表获得此例外。对于 `events`,协调会补齐当前事件表结构中缺少的列。尚未记录任何事件,或已禁用事件记录时,查询会提示表不存在。配置方法请参阅[事件记录配置](/user-guide/deployments-administration/configuration.md#事件记录配置)。 +事件记录器首次写入事件时会创建 `greptime_private.events` 系统表。如果现有表缺少当前事件表结构中的列,记录器会补齐这些列。即使自动建表已禁用,仍会执行这两项操作。尚未记录任何事件,或已禁用事件记录时,查询会提示表不存在。配置方法请参阅[事件记录配置](/user-guide/deployments-administration/configuration.md#事件记录配置)。 ```sql USE greptime_private; diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/slow_queries.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/slow_queries.md index dd5531c0c..ea15f2991 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/slow_queries.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/slow_queries.md @@ -6,7 +6,7 @@ description: greptime_private 数据库中的慢查询表。 # slow_queries `slow_queries` 表记录被慢查询记录器选中的 SQL 和 PromQL 查询。 -慢查询记录器写入此表时,即使服务端全局配置或请求级 `auto_create_table` hint 禁用了自动建表,仍可创建此表并以添加缺失列的方式协调其表结构。白名单中的表不会使同一写入请求中的其他表获得此例外。 +慢查询记录器写入 `greptime_private.slow_queries` 时,如果表不存在会创建表;如果现有表缺少列,则会补齐这些列。即使自动建表已禁用,仍会执行这两项操作。 :::tip 注意 `slow_queries` 表需要开启慢查询日志功能。详见[慢查询](/user-guide/deployments-administration/monitoring/slow-query.md)配置说明。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/events/overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/events/overview.md index 6b3652d26..aec40dd1d 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/events/overview.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/events/overview.md @@ -15,7 +15,7 @@ GreptimeDB 会异步写入事件记录,通常每 5 秒刷新一次。刚完成 ## 查询事件 -事件记录器首次写入事件时会创建 `greptime_private.events` 系统表。此表以及 `greptime_private.slow_queries` 和 `greptime_private.region_statistics_history` 都是内部系统表;即使服务端全局配置或请求级 `auto_create_table` hint 禁用了自动建表,内部写入仍可创建这些表并以添加缺失列的方式协调表结构。白名单中的表不会使同一写入请求中的其他表获得此例外。尚未记录任何事件,或已禁用事件记录时,下面的查询会报表不存在。 +事件记录器首次写入事件时会创建 `greptime_private.events` 系统表。如果现有表缺少当前事件表结构中的列,记录器会补齐这些列。即使自动建表已禁用,仍会执行这两项操作。尚未记录任何事件,或已禁用事件记录时,下面的查询会报表不存在。 排查最近的操作时,可以先查询最近一小时的事件,并将结果限制为 20 条: From 95512c26a6690923887c49dae5f04706eb2764f1 Mon Sep 17 00:00:00 2001 From: WenyXu Date: Wed, 2 Sep 2026 07:28:21 +0000 Subject: [PATCH 4/5] docs: clarify events table lifecycle Signed-off-by: WenyXu --- docs/reference/sql/greptime-private/events.md | 7 ++++--- .../monitoring/events/overview.md | 6 ++++-- .../current/reference/sql/greptime-private/events.md | 2 +- .../monitoring/events/overview.md | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/reference/sql/greptime-private/events.md b/docs/reference/sql/greptime-private/events.md index 794507647..ce982adb8 100644 --- a/docs/reference/sql/greptime-private/events.md +++ b/docs/reference/sql/greptime-private/events.md @@ -14,9 +14,10 @@ operation succeeded. When the event recorder writes its first event, it creates the `greptime_private.events` system table. If an existing table is missing columns from the current event schema, the recorder adds them. It performs both actions -even when automatic table creation is disabled. If no event has been recorded, or -event recording is disabled, querying it returns a table-not-found error. Configure -recording in [Event recording](/user-guide/deployments-administration/configuration.md#event-recording). +even when automatic table creation is disabled. Disabling event recording does +not remove an existing table. A query returns a table-not-found error only if the +table has never been created, for example because event recording was disabled +before any event was recorded. Configure recording in [Event recording](/user-guide/deployments-administration/configuration.md#event-recording). ```sql USE greptime_private; diff --git a/docs/user-guide/deployments-administration/monitoring/events/overview.md b/docs/user-guide/deployments-administration/monitoring/events/overview.md index 474b3fd30..ffaf9d257 100644 --- a/docs/user-guide/deployments-administration/monitoring/events/overview.md +++ b/docs/user-guide/deployments-administration/monitoring/events/overview.md @@ -21,8 +21,10 @@ See [Event recording](/user-guide/deployments-administration/configuration.md#ev When the event recorder writes its first event, it creates the `greptime_private.events` system table. If an existing table is missing columns from the current event schema, the recorder adds them. It performs both actions -even when automatic table creation is disabled. If no event has been recorded yet, -or event recording is disabled, this query returns a table-not-found error. +even when automatic table creation is disabled. Disabling event recording does +not remove an existing table. This query returns a table-not-found error only if +the table has never been created, for example because event recording was +disabled before any event was recorded. Start with a bounded query while investigating a recent operation: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/events.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/events.md index ccea887a2..54be1f333 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/events.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/events.md @@ -7,7 +7,7 @@ description: greptime_private 数据库中的 events 表。 `events` 表保存 GreptimeDB 运行期间产生的事件。单机部署记录受支持的本地 DDL Procedure 事件;带有 Metasrv 的分布式部署还可以记录运维事件。事件会异步写入,写入失败不会影响原操作的执行结果。因此,不能以事件是否出现作为操作成功的依据。 -事件记录器首次写入事件时会创建 `greptime_private.events` 系统表。如果现有表缺少当前事件表结构中的列,记录器会补齐这些列。即使自动建表已禁用,仍会执行这两项操作。尚未记录任何事件,或已禁用事件记录时,查询会提示表不存在。配置方法请参阅[事件记录配置](/user-guide/deployments-administration/configuration.md#事件记录配置)。 +事件记录器首次写入事件时会创建 `greptime_private.events` 系统表。如果现有表缺少当前事件表结构中的列,记录器会补齐这些列。即使自动建表已禁用,仍会执行这两项操作。禁用事件记录不会删除已有表。只有该表从未创建过时,查询才会提示表不存在,例如从启动时就禁用了事件记录,因而没有记录任何事件。配置方法请参阅[事件记录配置](/user-guide/deployments-administration/configuration.md#事件记录配置)。 ```sql USE greptime_private; diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/events/overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/events/overview.md index aec40dd1d..7199fc1ae 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/events/overview.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/events/overview.md @@ -15,7 +15,7 @@ GreptimeDB 会异步写入事件记录,通常每 5 秒刷新一次。刚完成 ## 查询事件 -事件记录器首次写入事件时会创建 `greptime_private.events` 系统表。如果现有表缺少当前事件表结构中的列,记录器会补齐这些列。即使自动建表已禁用,仍会执行这两项操作。尚未记录任何事件,或已禁用事件记录时,下面的查询会报表不存在。 +事件记录器首次写入事件时会创建 `greptime_private.events` 系统表。如果现有表缺少当前事件表结构中的列,记录器会补齐这些列。即使自动建表已禁用,仍会执行这两项操作。禁用事件记录不会删除已有表。只有该表从未创建过时,下面的查询才会报表不存在,例如从启动时就禁用了事件记录,因而没有记录任何事件。 排查最近的操作时,可以先查询最近一小时的事件,并将结果限制为 20 条: From 2fdc8955df1d723f271177f4aae8b8044703b363 Mon Sep 17 00:00:00 2001 From: WenyXu Date: Wed, 2 Sep 2026 10:35:18 +0000 Subject: [PATCH 5/5] docs: clarify dropped events table behavior Signed-off-by: WenyXu --- docs/reference/sql/greptime-private/events.md | 5 +++-- .../deployments-administration/monitoring/events/overview.md | 5 +++-- .../current/reference/sql/greptime-private/events.md | 2 +- .../deployments-administration/monitoring/events/overview.md | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/reference/sql/greptime-private/events.md b/docs/reference/sql/greptime-private/events.md index ce982adb8..7fd4b1901 100644 --- a/docs/reference/sql/greptime-private/events.md +++ b/docs/reference/sql/greptime-private/events.md @@ -16,8 +16,9 @@ When the event recorder writes its first event, it creates the from the current event schema, the recorder adds them. It performs both actions even when automatic table creation is disabled. Disabling event recording does not remove an existing table. A query returns a table-not-found error only if the -table has never been created, for example because event recording was disabled -before any event was recorded. Configure recording in [Event recording](/user-guide/deployments-administration/configuration.md#event-recording). +table does not currently exist, for example because event recording was disabled +before any event was recorded or the table was dropped. The recorder recreates the +table when it writes another event. Configure recording in [Event recording](/user-guide/deployments-administration/configuration.md#event-recording). ```sql USE greptime_private; diff --git a/docs/user-guide/deployments-administration/monitoring/events/overview.md b/docs/user-guide/deployments-administration/monitoring/events/overview.md index ffaf9d257..fce39b090 100644 --- a/docs/user-guide/deployments-administration/monitoring/events/overview.md +++ b/docs/user-guide/deployments-administration/monitoring/events/overview.md @@ -23,8 +23,9 @@ When the event recorder writes its first event, it creates the from the current event schema, the recorder adds them. It performs both actions even when automatic table creation is disabled. Disabling event recording does not remove an existing table. This query returns a table-not-found error only if -the table has never been created, for example because event recording was -disabled before any event was recorded. +the table does not currently exist, for example because event recording was +disabled before any event was recorded or the table was dropped. The recorder +recreates the table when it writes another event. Start with a bounded query while investigating a recent operation: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/events.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/events.md index 54be1f333..b70e094ce 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/events.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/greptime-private/events.md @@ -7,7 +7,7 @@ description: greptime_private 数据库中的 events 表。 `events` 表保存 GreptimeDB 运行期间产生的事件。单机部署记录受支持的本地 DDL Procedure 事件;带有 Metasrv 的分布式部署还可以记录运维事件。事件会异步写入,写入失败不会影响原操作的执行结果。因此,不能以事件是否出现作为操作成功的依据。 -事件记录器首次写入事件时会创建 `greptime_private.events` 系统表。如果现有表缺少当前事件表结构中的列,记录器会补齐这些列。即使自动建表已禁用,仍会执行这两项操作。禁用事件记录不会删除已有表。只有该表从未创建过时,查询才会提示表不存在,例如从启动时就禁用了事件记录,因而没有记录任何事件。配置方法请参阅[事件记录配置](/user-guide/deployments-administration/configuration.md#事件记录配置)。 +事件记录器首次写入事件时会创建 `greptime_private.events` 系统表。如果现有表缺少当前事件表结构中的列,记录器会补齐这些列。即使自动建表已禁用,仍会执行这两项操作。禁用事件记录不会删除已有表。只有该表当前不存在时,查询才会提示表不存在,例如从启动时就禁用了事件记录,或者表已被删除。事件记录器在下一次写入事件时会重新创建该表。配置方法请参阅[事件记录配置](/user-guide/deployments-administration/configuration.md#事件记录配置)。 ```sql USE greptime_private; diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/events/overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/events/overview.md index 7199fc1ae..c9739eb3a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/events/overview.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/events/overview.md @@ -15,7 +15,7 @@ GreptimeDB 会异步写入事件记录,通常每 5 秒刷新一次。刚完成 ## 查询事件 -事件记录器首次写入事件时会创建 `greptime_private.events` 系统表。如果现有表缺少当前事件表结构中的列,记录器会补齐这些列。即使自动建表已禁用,仍会执行这两项操作。禁用事件记录不会删除已有表。只有该表从未创建过时,下面的查询才会报表不存在,例如从启动时就禁用了事件记录,因而没有记录任何事件。 +事件记录器首次写入事件时会创建 `greptime_private.events` 系统表。如果现有表缺少当前事件表结构中的列,记录器会补齐这些列。即使自动建表已禁用,仍会执行这两项操作。禁用事件记录不会删除已有表。只有该表当前不存在时,下面的查询才会报表不存在,例如从启动时就禁用了事件记录,或者表已被删除。事件记录器在下一次写入事件时会重新创建该表。 排查最近的操作时,可以先查询最近一小时的事件,并将结果限制为 20 条: