Isolated table
activity_info_maps references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
The persistence schema of the Temporal server for PostgreSQL 12 and later, plus the standard visibility store. There are no foreign keys: every table carries shard_id and namespace_id (or a queue type) and the server keeps rows consistent itself, which is deliberate for a sharded, high-write store.
38 tables · 297 columns · 0 foreign keys · 9 domains | 0 errors · 0 warnings · 55 notes
Generated from temporal@v1.31.2.sql on 2026-09-05.
Conventions are claims. Findings below are where the schema breaks them.
activity_info_maps references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
buffered_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
build_id_to_task_queue references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
chasm_node_maps references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
child_execution_info_maps references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
session_start stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
Fix Use TIMESTAMPTZ.
ALTER TABLE cluster_membership ALTER COLUMN session_start TYPE timestamptz;
last_heartbeat stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
Fix Use TIMESTAMPTZ.
ALTER TABLE cluster_membership ALTER COLUMN last_heartbeat TYPE timestamptz;
record_expiry stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
Fix Use TIMESTAMPTZ.
ALTER TABLE cluster_membership ALTER COLUMN record_expiry TYPE timestamptz;
cluster_membership references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
cluster_metadata_info references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
start_time stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
Fix Use TIMESTAMPTZ.
ALTER TABLE current_chasm_executions ALTER COLUMN start_time TYPE timestamptz;
current_chasm_executions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
start_time stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
Fix Use TIMESTAMPTZ.
ALTER TABLE current_executions ALTER COLUMN start_time TYPE timestamptz;
current_executions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
executions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
start_time stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
Fix Use TIMESTAMPTZ.
ALTER TABLE executions_visibility ALTER COLUMN start_time TYPE timestamptz;
execution_time stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
Fix Use TIMESTAMPTZ.
ALTER TABLE executions_visibility ALTER COLUMN execution_time TYPE timestamptz;
close_time stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
Fix Use TIMESTAMPTZ.
ALTER TABLE executions_visibility ALTER COLUMN close_time TYPE timestamptz;
temporalscheduledstarttime stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
Fix Use TIMESTAMPTZ.
ALTER TABLE executions_visibility ALTER COLUMN temporalscheduledstarttime TYPE timestamptz;
datetime01 stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
Fix Use TIMESTAMPTZ.
ALTER TABLE executions_visibility ALTER COLUMN datetime01 TYPE timestamptz;
datetime02 stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
Fix Use TIMESTAMPTZ.
ALTER TABLE executions_visibility ALTER COLUMN datetime02 TYPE timestamptz;
datetime03 stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
Fix Use TIMESTAMPTZ.
ALTER TABLE executions_visibility ALTER COLUMN datetime03 TYPE timestamptz;
temporaldatetime01 stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
Fix Use TIMESTAMPTZ.
ALTER TABLE executions_visibility ALTER COLUMN temporaldatetime01 TYPE timestamptz;
temporaldatetime02 stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
Fix Use TIMESTAMPTZ.
ALTER TABLE executions_visibility ALTER COLUMN temporaldatetime02 TYPE timestamptz;
executions_visibility references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
Fix Look for column groups that always change together and split them out.
history_immediate_tasks references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
history_node references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
visibility_timestamp stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
Fix Use TIMESTAMPTZ.
ALTER TABLE history_scheduled_tasks ALTER COLUMN visibility_timestamp TYPE timestamptz;
history_scheduled_tasks references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
history_tree references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
namespace_metadata references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
namespaces references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
nexus_endpoints references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
nexus_endpoints_partition_status references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
queue references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
queue_messages references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
queue_metadata references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
queues references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
replication_tasks references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
replication_tasks_dlq references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
request_cancel_info_maps references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
shards references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
signal_info_maps references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
signals_requested_sets references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
task_queue_user_data references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
task_queues references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
task_queues_v2 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
tasks references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
tasks_v2 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
timer_info_maps references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
visibility_timestamp stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
Fix Use TIMESTAMPTZ.
ALTER TABLE timer_tasks ALTER COLUMN visibility_timestamp TYPE timestamptz;
timer_tasks references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
transfer_tasks references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
visibility_tasks references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
Fix Document its purpose or drop it.
38 tables · 0 foreign keys · 9 domains. Open the 3D explorer: rotate, zoom, click any table or relationship.
Registered namespaces and the metadata row that versions them.
No foreign keys in this domain.
schema/postgresql/v12/temporal/schema.sql
namespaces references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
partition_id PK | integer | NOT NULL | |||
id PK | bytea | NOT NULL | |||
name UK | varchar(255) | NOT NULL | |||
notification_version | bigint | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | NOT NULL | |||
is_global | boolean | NOT NULL |
namespace_metadata references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
partition_id PK | integer | NOT NULL | |||
notification_version | bigint | NOT NULL |
Shard ownership, the mutable state of every workflow execution, the current run per workflow id, buffered events, and the CHASM node tree.
No foreign keys in this domain.
shards references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
shard_id PK | integer | NOT NULL | |||
range_id | bigint | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | NOT NULL |
executions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
shard_id PK | integer | NOT NULL | |||
namespace_id PK | bytea | NOT NULL | |||
workflow_id PK | varchar(255) | NOT NULL | |||
run_id PK | bytea | NOT NULL | |||
next_event_id | bigint | NOT NULL | |||
last_write_version | bigint | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | NOT NULL | |||
state | bytea | NOT NULL | |||
state_encoding | varchar(16) | NOT NULL | |||
db_record_version | bigint | NOT NULL | 0 |
start_time — start_time stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.current_executions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
shard_id PK | integer | NOT NULL | |||
namespace_id PK | bytea | NOT NULL | |||
workflow_id PK | varchar(255) | NOT NULL | |||
run_id | bytea | NOT NULL | |||
create_request_id | varchar(255) | NOT NULL | |||
state | integer | NOT NULL | |||
status | integer | NOT NULL | |||
start_version | bigint | NOT NULL | 0 | ||
start_time | timestamp | null | |||
last_write_version | bigint | NOT NULL | |||
data | bytea | null | |||
data_encoding | varchar(16) | NOT NULL | '' |
start_time — start_time stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.current_chasm_executions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
shard_id PK | integer | NOT NULL | |||
namespace_id PK | bytea | NOT NULL | |||
business_id PK | varchar(255) | NOT NULL | |||
archetype_id PK | bigint | NOT NULL | |||
run_id | bytea | NOT NULL | |||
create_request_id | varchar(255) | NOT NULL | |||
state | integer | NOT NULL | |||
status | integer | NOT NULL | |||
start_version | bigint | NOT NULL | 0 | ||
start_time | timestamp | null | |||
last_write_version | bigint | NOT NULL | |||
data | bytea | null | |||
data_encoding | varchar(16) | NOT NULL | '' |
buffered_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
shard_id PK | integer | NOT NULL | |||
namespace_id PK | bytea | NOT NULL | |||
workflow_id PK | varchar(255) | NOT NULL | |||
run_id PK | bytea | NOT NULL | |||
id PK | bigserial | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | NOT NULL |
chasm_node_maps references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
shard_id PK | integer | NOT NULL | |||
namespace_id PK | bytea | NOT NULL | |||
workflow_id PK | varchar(255) | NOT NULL | |||
run_id PK | bytea | NOT NULL | |||
chasm_path PK | bytea | NOT NULL | |||
metadata | bytea | NOT NULL | |||
metadata_encoding | varchar(16) | null | |||
data | bytea | null | |||
data_encoding | varchar(16) | null |
Per-execution maps keyed by shard, namespace, workflow and run: activities, timers, child workflows, cancel and signal requests.
No foreign keys in this domain.
activity_info_maps references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
shard_id PK | integer | NOT NULL | |||
namespace_id PK | bytea | NOT NULL | |||
workflow_id PK | varchar(255) | NOT NULL | |||
run_id PK | bytea | NOT NULL | |||
schedule_id PK | bigint | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | null |
timer_info_maps references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
shard_id PK | integer | NOT NULL | |||
namespace_id PK | bytea | NOT NULL | |||
workflow_id PK | varchar(255) | NOT NULL | |||
run_id PK | bytea | NOT NULL | |||
timer_id PK | varchar(255) | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | null |
child_execution_info_maps references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
shard_id PK | integer | NOT NULL | |||
namespace_id PK | bytea | NOT NULL | |||
workflow_id PK | varchar(255) | NOT NULL | |||
run_id PK | bytea | NOT NULL | |||
initiated_id PK | bigint | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | null |
request_cancel_info_maps references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
shard_id PK | integer | NOT NULL | |||
namespace_id PK | bytea | NOT NULL | |||
workflow_id PK | varchar(255) | NOT NULL | |||
run_id PK | bytea | NOT NULL | |||
initiated_id PK | bigint | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | null |
signal_info_maps references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
shard_id PK | integer | NOT NULL | |||
namespace_id PK | bytea | NOT NULL | |||
workflow_id PK | varchar(255) | NOT NULL | |||
run_id PK | bytea | NOT NULL | |||
initiated_id PK | bigint | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | null |
signals_requested_sets references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
shard_id PK | integer | NOT NULL | |||
namespace_id PK | bytea | NOT NULL | |||
workflow_id PK | varchar(255) | NOT NULL | |||
run_id PK | bytea | NOT NULL | |||
signal_id PK | varchar(255) | NOT NULL |
The append-only history nodes and the branch tree that lets runs share prefixes.
No foreign keys in this domain.
history eventsV2: history_node stores history event data
history_node references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
shard_id PK | integer | NOT NULL | |||
tree_id PK | bytea | NOT NULL | |||
branch_id PK | bytea | NOT NULL | |||
node_id PK | bigint | NOT NULL | |||
txn_id PK | bigint | NOT NULL | |||
prev_txn_id | bigint | NOT NULL | 0 | ||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | NOT NULL |
history eventsV2: history_tree stores branch metadata
history_tree references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
shard_id PK | integer | NOT NULL | |||
tree_id PK | bytea | NOT NULL | |||
branch_id PK | bytea | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | NOT NULL |
Workflow and activity tasks waiting for a worker, the queues that hold them, per-queue user data and build-id routing. The v2 tables are the fairness-aware successors.
No foreign keys in this domain.
tasks references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
range_hash PK | bigint | NOT NULL | |||
task_queue_id PK | bytea | NOT NULL | |||
task_id PK | bigint | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | NOT NULL |
Stores ephemeral task queue information such as ack levels and expiry times
task_queues references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
range_hash PK | bigint | NOT NULL | |||
task_queue_id PK | bytea | NOT NULL | |||
range_id | bigint | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | NOT NULL |
Stores activity or workflow tasks Used for fairness scheduling. (pass, task_id) are monotonically increasing.
tasks_v2 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
range_hash PK | bigint | NOT NULL | |||
task_queue_id PK | bytea | NOT NULL | |||
pass PK | bigint | NOT NULL | pass for tasks (see stride scheduling algorithm for fairness) | ||
task_id PK | bigint | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | NOT NULL |
Stores ephemeral task queue information such as ack levels and expiry times
task_queues_v2 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
range_hash PK | bigint | NOT NULL | |||
task_queue_id PK | bytea | NOT NULL | |||
range_id | bigint | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | NOT NULL |
Stores task queue information such as user provided versioning data
task_queue_user_data references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
namespace_id PK | bytea | NOT NULL | |||
task_queue_name PK | varchar(255) | NOT NULL | |||
data | bytea | NOT NULL | temporal.server.api.persistence.v1.TaskQueueUserData | ||
data_encoding | varchar(16) | NOT NULL | Encoding type used for serialization, in practice this should always be proto3 | ||
version | bigint | NOT NULL | Version of this row, used for optimistic concurrency |
Stores a mapping between build ids and task queues
build_id_to_task_queue references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
namespace_id PK | bytea | NOT NULL | |||
build_id PK | varchar(255) | NOT NULL | |||
task_queue_name PK | varchar(255) | NOT NULL |
The internal queues the history service works through: immediate and scheduled tasks, transfer, timer, replication (with its dead-letter queue) and visibility tasks.
No foreign keys in this domain.
history_immediate_tasks references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
shard_id PK | integer | NOT NULL | |||
category_id PK | integer | NOT NULL | |||
task_id PK | bigint | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | NOT NULL |
visibility_timestamp — visibility_timestamp stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.history_scheduled_tasks references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
shard_id PK | integer | NOT NULL | |||
category_id PK | integer | NOT NULL | |||
visibility_timestamp PK | timestamp | NOT NULL | |||
task_id PK | bigint | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | NOT NULL |
transfer_tasks references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
shard_id PK | integer | NOT NULL | |||
task_id PK | bigint | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | NOT NULL |
visibility_timestamp — visibility_timestamp stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.timer_tasks references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
shard_id PK | integer | NOT NULL | |||
visibility_timestamp PK | timestamp | NOT NULL | |||
task_id PK | bigint | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | NOT NULL |
replication_tasks references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
shard_id PK | integer | NOT NULL | |||
task_id PK | bigint | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | NOT NULL |
replication_tasks_dlq references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
source_cluster_name PK | varchar(255) | NOT NULL | |||
shard_id PK | integer | NOT NULL | |||
task_id PK | bigint | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | NOT NULL |
visibility_tasks references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
shard_id PK | integer | NOT NULL | |||
task_id PK | bigint | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | NOT NULL |
Generic persistence queues and their metadata, the newer queue tables, cluster metadata and membership.
No foreign keys in this domain.
queue references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
queue_type PK | integer | NOT NULL | |||
message_id PK | bigint | NOT NULL | |||
message_payload | bytea | NOT NULL | |||
message_encoding | varchar(16) | NOT NULL |
queue_metadata references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
queue_type PK | integer | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | NOT NULL | |||
version | bigint | NOT NULL |
queues references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
queue_type PK | integer | NOT NULL | |||
queue_name PK | varchar(255) | NOT NULL | |||
metadata_payload | bytea | NOT NULL | |||
metadata_encoding | varchar(16) | NOT NULL |
queue_messages references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
queue_type PK | integer | NOT NULL | |||
queue_name PK | varchar(255) | NOT NULL | |||
queue_partition PK | bigint | NOT NULL | |||
message_id PK | bigint | NOT NULL | |||
message_payload | bytea | NOT NULL | |||
message_encoding | varchar(16) | NOT NULL |
cluster_metadata_info references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
metadata_partition PK | integer | NOT NULL | |||
cluster_name PK | varchar(255) | NOT NULL | |||
data | bytea | NOT NULL | |||
data_encoding | varchar(16) | NOT NULL | |||
version | bigint | NOT NULL |
session_start — session_start stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.last_heartbeat — last_heartbeat stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.record_expiry — record_expiry stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.cluster_membership references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
membership_partition PK | integer | NOT NULL | |||
host_id PK | bytea | NOT NULL | |||
rpc_address | varchar(128) | NOT NULL | |||
rpc_port | smallint | NOT NULL | |||
role | smallint | NOT NULL | |||
session_start | timestamp | null | '1970-01-01 00:00:01+00:00' | ||
last_heartbeat | timestamp | null | '1970-01-01 00:00:01+00:00' | ||
record_expiry | timestamp | null | '1970-01-01 00:00:01+00:00' |
Nexus endpoints and the partition status row that versions them.
No foreign keys in this domain.
Stores information about Nexus endpoints
nexus_endpoints references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
id PK | bytea | NOT NULL | |||
data | bytea | NOT NULL | temporal.server.api.persistence.v1.NexusEndpoint | ||
data_encoding | varchar(16) | NOT NULL | Encoding type used for serialization, in practice this should always be proto3 | ||
version | bigint | NOT NULL | Version of this row, used for optimistic concurrency |
Stores the version of Nexus endpoints table as a whole
nexus_endpoints_partition_status references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
id PK | integer | NOT NULL | 0 | CHECK id = 0 | |
version | bigint | NOT NULL | Version of the nexus_endpoints table |
Table checks: id = 0
The standard visibility store: one denormalised row per execution for listing and search.
No foreign keys in this domain.
start_time — start_time stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.execution_time — execution_time stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.close_time — close_time stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.temporalscheduledstarttime — temporalscheduledstarttime stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.datetime01 — datetime01 stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.datetime02 — datetime02 stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.datetime03 — datetime03 stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.temporaldatetime01 — temporaldatetime01 stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.temporaldatetime02 — temporaldatetime02 stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.executions_visibility references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.| Column | Type | Null | Default | References | Notes |
|---|---|---|---|---|---|
namespace_id PK | char(64) | NOT NULL | |||
run_id PK | char(64) | NOT NULL | |||
_version | bigint | NOT NULL | 0 | increasing version, used to reject upserts which are out of order | |
start_time | timestamp | NOT NULL | |||
execution_time | timestamp | NOT NULL | |||
workflow_id | varchar(255) | NOT NULL | |||
workflow_type_name | varchar(255) | NOT NULL | |||
status | integer | NOT NULL | enum WorkflowExecutionStatus {RUNNING, COMPLETED, FAILED, CANCELED, TERMINATED, CONTINUED_AS_NEW, TIMED_OUT} | ||
close_time | timestamp | null | |||
history_length | bigint | null | |||
history_size_bytes | bigint | null | |||
execution_duration | bigint | null | |||
state_transition_count | bigint | null | |||
memo | bytea | null | |||
encoding | varchar(64) | NOT NULL | |||
task_queue | varchar(255) | NOT NULL | '' | ||
search_attributes | jsonb | null | |||
parent_workflow_id | varchar(255) | null | |||
parent_run_id | varchar(255) | null | |||
root_workflow_id | varchar(255) | NOT NULL | '' | ||
root_run_id | varchar(255) | NOT NULL | '' | ||
temporalchangeversion | jsonb | null | |||
binarychecksums | jsonb | null | |||
batcheruser | varchar(255) | null | |||
temporalscheduledstarttime | timestamp | null | |||
temporalscheduledbyid | varchar(255) | null | |||
temporalschedulepaused | boolean | null | |||
temporalnamespacedivision | varchar(255) | null | |||
buildids | jsonb | null | |||
temporalpauseinfo | jsonb | null | |||
temporalreportedproblems | jsonb | null | |||
temporalworkerdeploymentversion | varchar(255) | null | |||
temporalworkflowversioningbehavior | varchar(255) | null | |||
temporalworkerdeployment | varchar(255) | null | |||
temporalusedworkerdeploymentversions | jsonb | null | |||
temporalexternalpayloadsizebytes | bigint | null | |||
temporalexternalpayloadcount | bigint | null | |||
bool01 | boolean | null | |||
bool02 | boolean | null | |||
bool03 | boolean | null | |||
datetime01 | timestamp | null | |||
datetime02 | timestamp | null | |||
datetime03 | timestamp | null | |||
double01 | numeric(20, 5) | null | |||
double02 | numeric(20, 5) | null | |||
double03 | numeric(20, 5) | null | |||
int01 | bigint | null | |||
int02 | bigint | null | |||
int03 | bigint | null | |||
keyword01 | varchar(255) | null | |||
keyword02 | varchar(255) | null | |||
keyword03 | varchar(255) | null | |||
keyword04 | varchar(255) | null | |||
keyword05 | varchar(255) | null | |||
keyword06 | varchar(255) | null | |||
keyword07 | varchar(255) | null | |||
keyword08 | varchar(255) | null | |||
keyword09 | varchar(255) | null | |||
keyword10 | varchar(255) | null | |||
text01 | tsvector | null | |||
text02 | tsvector | null | |||
text03 | tsvector | null | |||
keywordlist01 | jsonb | null | |||
keywordlist02 | jsonb | null | |||
keywordlist03 | jsonb | null | |||
temporalbool01 | boolean | null | |||
temporalbool02 | boolean | null | |||
temporaldatetime01 | timestamp | null | |||
temporaldatetime02 | timestamp | null | |||
temporaldouble01 | numeric(20, 5) | null | |||
temporaldouble02 | numeric(20, 5) | null | |||
temporalint01 | bigint | null | |||
temporalint02 | bigint | null | |||
temporalkeyword01 | varchar(255) | null | |||
temporalkeyword02 | varchar(255) | null | |||
temporalkeyword03 | varchar(255) | null | |||
temporalkeyword04 | varchar(255) | null | |||
temporallowcardinalitykeyword01 | varchar(255) | null | |||
temporalkeywordlist01 | jsonb | null | |||
temporalkeywordlist02 | jsonb | null |