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 table | Description |
|---|---|
hologres.hg_dynamic_table_properties | Stores Dynamic Table metadata, including refresh mode, schedule, and computing resource configuration. |
hologres.hg_dynamic_table_dependencies | Stores data lineage — the base tables a Dynamic Table depends on. |
hologres.hg_dynamic_table_refresh_activity | Stores currently running refresh tasks. Not supported in Hologres V3.1 and later. |
hologres.hg_dynamic_table_refresh_history | Stores 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.
| Field | Description |
|---|---|
dynamic_table_namespace | The schema where the Dynamic Table resides. |
dynamic_table_name | The name of the Dynamic Table. |
property_key and property_value | The property name and its value. See the following tables for all supported properties. |
General properties
| Property | Description |
|---|---|
execution_mode | The refresh mode. Valid values: full (full refresh), incremental (incremental refresh), none (no refresh mode set). |
task_definition | The query definition of the Dynamic Table. |
auto_refresh_enable | Whether auto-refresh is enabled. Valid values: true (enabled), false (Cancel). |
task_definition_search_path | The schema of the query. |
state_time_to_live_in_seconds | The retention period of data in the state table, in seconds. |
Parameters for incremental refresh
| Property | Description |
|---|---|
incremental_auto_refresh_schd_start_time | The 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_interval | The refresh interval. Range: 1 minute to 48 hours. |
incremental_guc_hg_computing_resource | The computing resource for the refresh. The value is serverless, which means Serverless Computing resources are used. |
incremental_guc_hg_experimental_serverless_computing_required_cores | The computing resource specifications for incremental refresh. |
incremental_state_table_group | The table group where the state table resides in incremental refresh mode. |
incremental_plan | The execution plan for incremental refresh. |
Parameters for full refresh
| Property | Description |
|---|---|
full_auto_refresh_schd_start_time | The 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_interval | The refresh interval. Range: 1 minute to 48 hours. |
full_guc_hg_computing_resource | The 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_cores | The 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_mvsystem schema. Ignore rows with this schema in practice.Use system tables such as
pg_classto further differentiate base table types.
| Field | Description |
|---|---|
table_namespace | The schema where the base table resides. |
table_name | The name of the base table. |
dynamic_table_namespace | The schema where the Dynamic Table resides. |
dynamic_table_name | The name of the Dynamic Table. |
dependency | The 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.
| Field | Description |
|---|---|
pid | The process ID (PID) of the refresh task. Use the PID to cancel a running refresh task. For more information, see Cancel a refresh task. |
datname | The database where the Dynamic Table resides. |
query_id | The query ID of the refresh task. |
usename | The user who performs the Dynamic Table refresh. |
query | The refresh query. |
refresh_mode | The refresh mode. Valid values: full (full refresh), incremental (incremental refresh), none (no refresh mode set). |
refresh_start | The start time of the refresh task. |
duration | The running time of the refresh task. |
serverless_queue_time_ms | The time the refresh task spent waiting for Serverless Computing resources. Displayed only for refreshes that use Serverless Computing. |
serverless_resource_used_time_ms | The time the refresh task used Serverless Computing resources. Displayed only for refreshes that use Serverless Computing. |
serverless_allocated_cores | The Serverless Computing resource specifications allocated to the refresh task. Displayed only for refreshes that use Serverless Computing. |
serverless_allocated_workers | The number of serverless workers allocated to the refresh task. Displayed only for refreshes that use Serverless Computing. |
table_write | The 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.
| Field | Description |
|---|---|
datname | The database where the Dynamic Table resides. |
schema_name | The schema where the Dynamic Table resides. |
dynamic_table_name | The name of the Dynamic Table. |
query_id | The query ID of the refresh. Use the query ID in Get query insights to view detailed query information. |
refresh_start | The start time of the refresh. |
refresh_end | The end time of the refresh. |
duration | The duration of the refresh. |
refresh_latency | The data latency at the time the refresh completed. |
refresh_mode | The refresh mode. Valid values: full (full refresh), incremental (incremental refresh), none (no refresh mode set). |
status | The status of the refresh. Valid values: SUCCESS (Success), FAILED (The task failed). |
queue_time_ms | The time spent waiting for Serverless Computing resources. Displayed only for refreshes that use Serverless Computing. |
serverless_allocated_cores | The amount of Serverless Computing resources used, in CUs. Displayed only for refreshes that use Serverless Computing. |
serverless_allocated_workers | The number of serverless workers used. Displayed only for refreshes that use Serverless Computing. |
serverless_resource_used_time_ms | The 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;