System tables for dynamic table

更新时间: 2026-03-25 21:57:47

Hologres provides four system tables for managing and monitoring Dynamic Tables. Use these tables to inspect metadata, trace data lineage, and diagnose refresh task issues.

System tableDescription
hologres.hg_dynamic_table_propertiesStores Dynamic Table metadata, including refresh mode, schedule, and computing resource configuration.
hologres.hg_dynamic_table_dependenciesStores data lineage — the base tables a Dynamic Table depends on.
hologres.hg_dynamic_table_refresh_activityStores currently running refresh tasks. Not supported in Hologres V3.1 and later.
hologres.hg_dynamic_table_refresh_historyStores the history of refresh tasks. Data is retained for one month by default.

The hologres.hg_dynamic_table_properties system table

This table stores the metadata of each Dynamic Table, including its refresh configuration and query definition.

FieldDescription
dynamic_table_namespaceThe schema where the Dynamic Table resides.
dynamic_table_nameThe name of the Dynamic Table.
property_key and property_valueThe property name and its value. See the following tables for all supported properties.

General properties

PropertyDescription
execution_modeThe refresh mode. Valid values: full (full refresh), incremental (incremental refresh), none (no refresh mode set).
task_definitionThe query definition of the Dynamic Table.
auto_refresh_enableWhether auto-refresh is enabled. Valid values: true (enabled), false (Cancel).
task_definition_search_pathThe schema of the query.
state_time_to_live_in_secondsThe retention period of data in the state table, in seconds.

Parameters for incremental refresh

PropertyDescription
incremental_auto_refresh_schd_start_timeThe start time of the refresh. Valid values: immediate (starts immediately after the table is created), or a custom time such as 2024-08-27 15:00:00.
incremental_auto_refresh_intervalThe refresh interval. Range: 1 minute to 48 hours.
incremental_guc_hg_computing_resourceThe computing resource for the refresh. The value is serverless, which means Serverless Computing resources are used.
incremental_guc_hg_experimental_serverless_computing_required_coresThe computing resource specifications for incremental refresh.
incremental_state_table_groupThe table group where the state table resides in incremental refresh mode.
incremental_planThe execution plan for incremental refresh.

Parameters for full refresh

PropertyDescription
full_auto_refresh_schd_start_timeThe start time of the refresh. Valid values: immediate (starts immediately after the table is created), or a custom time such as 2024-08-27 15:00:00.
full_auto_refresh_intervalThe refresh interval. Range: 1 minute to 48 hours.
full_guc_hg_computing_resourceThe computing resource used. Valid values: local (uses the current instance resources), serverless (uses Serverless Computing resources). For more information, see Serverless Computing.
full_guc_hg_experimental_serverless_computing_required_coresThe computing resource specifications for full refresh.

The hologres.hg_dynamic_table_dependencies system table

This table stores the data lineage of Dynamic Tables — specifically, which base tables each Dynamic Table depends on.

Usage notes:

  • A Dynamic Table can depend on multiple base tables, so multiple rows may appear for a single Dynamic Table.

  • The state table used in incremental refresh is also recorded as a base table. By default, it is in the hologres_streaming_mv system schema. Ignore rows with this schema in practice.

  • Use system tables such as pg_class to further differentiate base table types.

FieldDescription
table_namespaceThe schema where the base table resides.
table_nameThe name of the base table.
dynamic_table_namespaceThe schema where the Dynamic Table resides.
dynamic_table_nameThe name of the Dynamic Table.
dependencyThe type of the base table. Valid values: base_table (standard table), base_dimension_table (dimension table), internal_table (internal table — ignore in practice).

Example: query data lineage for a specific Dynamic Table

SELECT
  table_namespace,
  table_name,
  dependency
FROM hologres.hg_dynamic_table_dependencies
WHERE dynamic_table_name = '<your_dynamic_table>'
  AND table_namespace != 'hologres_streaming_mv'
ORDER BY dependency;

The hologres.hg_dynamic_table_refresh_activity system table

This system table is not supported in Hologres instances of V3.1 and later. Use hologres.hg_dynamic_table_refresh_history to view completed refresh tasks.

This table records currently running Dynamic Table refresh tasks.

FieldDescription
pidThe process ID (PID) of the refresh task. Use the PID to cancel a running refresh task. For more information, see Cancel a refresh task.
datnameThe database where the Dynamic Table resides.
query_idThe query ID of the refresh task.
usenameThe user who performs the Dynamic Table refresh.
queryThe refresh query.
refresh_modeThe refresh mode. Valid values: full (full refresh), incremental (incremental refresh), none (no refresh mode set).
refresh_startThe start time of the refresh task.
durationThe running time of the refresh task.
serverless_queue_time_msThe time the refresh task spent waiting for Serverless Computing resources. Displayed only for refreshes that use Serverless Computing.
serverless_resource_used_time_msThe time the refresh task used Serverless Computing resources. Displayed only for refreshes that use Serverless Computing.
serverless_allocated_coresThe Serverless Computing resource specifications allocated to the refresh task. Displayed only for refreshes that use Serverless Computing.
serverless_allocated_workersThe number of serverless workers allocated to the refresh task. Displayed only for refreshes that use Serverless Computing.
table_writeThe Dynamic Table on which the refresh task is performed. Displayed only for refreshes that use Serverless Computing.

The hologres.hg_dynamic_table_refresh_history system table

This table stores the history of Dynamic Table refresh tasks. Data is retained for one month by default.

FieldDescription
datnameThe database where the Dynamic Table resides.
schema_nameThe schema where the Dynamic Table resides.
dynamic_table_nameThe name of the Dynamic Table.
query_idThe query ID of the refresh. Use the query ID in Get query insights to view detailed query information.
refresh_startThe start time of the refresh.
refresh_endThe end time of the refresh.
durationThe duration of the refresh.
refresh_latencyThe data latency at the time the refresh completed.
refresh_modeThe refresh mode. Valid values: full (full refresh), incremental (incremental refresh), none (no refresh mode set).
statusThe status of the refresh. Valid values: SUCCESS (Success), FAILED (The task failed).
queue_time_msThe time spent waiting for Serverless Computing resources. Displayed only for refreshes that use Serverless Computing.
serverless_allocated_coresThe amount of Serverless Computing resources used, in CUs. Displayed only for refreshes that use Serverless Computing.
serverless_allocated_workersThe number of serverless workers used. Displayed only for refreshes that use Serverless Computing.
serverless_resource_used_time_msThe time Serverless Computing resources were actively used to execute the query, in milliseconds. Does not include queuing time. Displayed only for refreshes that use Serverless Computing.

Example: find failed refreshes in the past week

SELECT
  dynamic_table_name,
  refresh_start,
  refresh_end,
  duration,
  refresh_mode,
  status
FROM hologres.hg_dynamic_table_refresh_history
WHERE status = 'FAILED'
  AND refresh_start >= NOW() - INTERVAL '7 days'
ORDER BY refresh_start DESC;

Example: check refresh latency for a specific Dynamic Table

SELECT
  refresh_start,
  refresh_end,
  duration,
  refresh_latency,
  status
FROM hologres.hg_dynamic_table_refresh_history
WHERE dynamic_table_name = '<your_dynamic_table>'
ORDER BY refresh_start DESC
LIMIT 20;

What's next

上一篇: Manage refresh tasks 下一篇: Set dynamic table refresh resources
阿里云首页 实时数仓 Hologres 相关技术圈