Temporal

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

Conventions are claims. Findings below are where the schema breaks them.

Findings

Notes (55)

F037activity_info_mapsorphan-table

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.

F023buffered_eventsorphan-table

Isolated table

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.

F029build_id_to_task_queueorphan-table

Isolated table

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.

F043chasm_node_mapsorphan-table

Isolated table

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.

Isolated table

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.

F005cluster_membership session_starttimestamp-tz

TIMESTAMP without time zone

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;
F006cluster_membership last_heartbeattimestamp-tz

TIMESTAMP without time zone

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;
F007cluster_membership record_expirytimestamp-tz

TIMESTAMP without time zone

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;
F049cluster_membershiporphan-table

Isolated table

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.

F048cluster_metadata_infoorphan-table

Isolated table

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.

F002current_chasm_executions start_timetimestamp-tz

TIMESTAMP without time zone

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;
F022current_chasm_executionsorphan-table

Isolated table

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.

F001current_executions start_timetimestamp-tz

TIMESTAMP without time zone

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;
F021current_executionsorphan-table

Isolated table

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.

F020executionsorphan-table

Isolated table

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.

F008executions_visibility start_timetimestamp-tz

TIMESTAMP without time zone

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;
F009executions_visibility execution_timetimestamp-tz

TIMESTAMP without time zone

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;
F010executions_visibility close_timetimestamp-tz

TIMESTAMP without time zone

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;
F011executions_visibility temporalscheduledstarttimetimestamp-tz

TIMESTAMP without time zone

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;
F012executions_visibility datetime01timestamp-tz

TIMESTAMP without time zone

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;
F013executions_visibility datetime02timestamp-tz

TIMESTAMP without time zone

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;
F014executions_visibility datetime03timestamp-tz

TIMESTAMP without time zone

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;
F015executions_visibility temporaldatetime01timestamp-tz

TIMESTAMP without time zone

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;
F016executions_visibility temporaldatetime02timestamp-tz

TIMESTAMP without time zone

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;
F054executions_visibilityorphan-table

Isolated table

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.

F055executions_visibilitywide-table

Wide table (80 columns)

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.

F030history_immediate_tasksorphan-table

Isolated table

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.

F044history_nodeorphan-table

Isolated table

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.

F003history_scheduled_tasks visibility_timestamptimestamp-tz

TIMESTAMP without time zone

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;
F031history_scheduled_tasksorphan-table

Isolated table

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.

F045history_treeorphan-table

Isolated table

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.

F018namespace_metadataorphan-table

Isolated table

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.

F017namespacesorphan-table

Isolated table

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.

F052nexus_endpointsorphan-table

Isolated table

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.

Isolated table

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.

F046queueorphan-table

Isolated table

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.

F051queue_messagesorphan-table

Isolated table

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.

F047queue_metadataorphan-table

Isolated table

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.

F050queuesorphan-table

Isolated table

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.

F034replication_tasksorphan-table

Isolated table

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.

F035replication_tasks_dlqorphan-table

Isolated table

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.

F040request_cancel_info_mapsorphan-table

Isolated table

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.

F019shardsorphan-table

Isolated table

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.

F041signal_info_mapsorphan-table

Isolated table

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.

F042signals_requested_setsorphan-table

Isolated table

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.

F028task_queue_user_dataorphan-table

Isolated table

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.

F025task_queuesorphan-table

Isolated table

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.

F027task_queues_v2orphan-table

Isolated table

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.

F024tasksorphan-table

Isolated table

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.

F026tasks_v2orphan-table

Isolated table

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.

F038timer_info_mapsorphan-table

Isolated table

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.

F004timer_tasks visibility_timestamptimestamp-tz

TIMESTAMP without time zone

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;
F033timer_tasksorphan-table

Isolated table

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.

F032transfer_tasksorphan-table

Isolated table

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.

F036visibility_tasksorphan-table

Isolated table

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.

Schema

Schema map: 38 tables, 0 foreign keys, 9 domains. Click to open the 3D explorer.Namespacesnamespace_metadatanamespacesShards and executionsbuffered_eventschasm_node_mapscurrent_chasm_executionscurrent_executionsexecutionsshardsMutable state mapsactivity_info_mapschild_execution_info_mapsrequest_cancel_info_mapssignal_info_mapssignals_requested_setstimer_info_mapsEvent historyhistory_nodehistory_treeTask queues (matching)build_id_to_task_queuetask_queue_user_datatask_queuestask_queues_v2taskstasks_v2History service task queueshistory_immediate_taskshistory_scheduled_tasksreplication_tasksreplication_tasks_dlqtimer_taskstransfer_tasksvisibility_tasksQueues and clustercluster_membershipcluster_metadata_infoqueuequeue_messagesqueue_metadataqueuesNexusnexus_endpointsnexus_endpoints_partition_statusVisibilityexecutions_visibility

38 tables · 0 foreign keys · 9 domains. Open the 3D explorer: rotate, zoom, click any table or relationship.

Namespaces 2 tables

Registered namespaces and the metadata row that versions them.

Entity-relationship diagram: namespaces, namespace_metadatanamespacespartition_id PKintegerid PKbyteanamevarchar(255)notification_versionbigintdatabyteadata_encodingvarchar(16)is_globalbooleannamespace_metadatapartition_id PKintegernotification_versionbigint

Relationships

No foreign keys in this domain.

namespaces

7 cols · no RLS · line 2View in 3D

schema/postgresql/v12/temporal/schema.sql

  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
partition_id PKintegerNOT NULL
id PKbyteaNOT NULL
name UKvarchar(255)NOT NULL
notification_version bigintNOT NULL
data byteaNOT NULL
data_encoding varchar(16)NOT NULL
is_global booleanNOT NULL

Indexes

  • none

Referenced by

  • nothing

namespace_metadata

2 cols · no RLS · line 14View in 3D
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
partition_id PKintegerNOT NULL
notification_version bigintNOT NULL

Indexes

  • none

Referenced by

  • nothing

Shards and executions 6 tables

Shard ownership, the mutable state of every workflow execution, the current run per workflow id, buffered events, and the CHASM node tree.

Entity-relationship diagram: shards, executions, current_executions, current_chasm_executions, buffered_events, chasm_node_mapsshardsshard_id PKintegerrange_idbigintdatabyteadata_encodingvarchar(16)executionsshard_id PKintegernamespace_id PKbyteaworkflow_id PKvarchar(255)run_id PKbyteanext_event_idbigintlast_write_versionbigintdatabyteadata_encodingvarchar(16)statebyteastate_encodingvarchar(16)db_record_versionbigintcurrent_executionsshard_id PKintegernamespace_id PKbyteaworkflow_id PKvarchar(255)run_idbyteacreate_request_idvarchar(255)stateintegerstatusintegerstart_versionbigintstart_timetimestamplast_write_versionbigintdatabyteadata_encodingvarchar(16)current_chasm_executionsshard_id PKintegernamespace_id PKbyteabusiness_id PKvarchar(255)archetype_id PKbigintrun_idbyteacreate_request_idvarchar(255)stateintegerstatusintegerstart_versionbigintstart_timetimestamplast_write_versionbigintdatabyteadata_encodingvarchar(16)buffered_eventsshard_id PKintegernamespace_id PKbyteaworkflow_id PKvarchar(255)run_id PKbyteaid PKbigserialdatabyteadata_encodingvarchar(16)chasm_node_mapsshard_id PKintegernamespace_id PKbyteaworkflow_id PKvarchar(255)run_id PKbyteachasm_path PKbyteametadatabyteametadata_encodingvarchar(16)databyteadata_encodingvarchar(16)

Relationships

No foreign keys in this domain.

shards

4 cols · no RLS · line 22View in 3D
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
shard_id PKintegerNOT NULL
range_id bigintNOT NULL
data byteaNOT NULL
data_encoding varchar(16)NOT NULL

Indexes

  • none

Referenced by

  • nothing

executions

11 cols · no RLS · line 31View in 3D
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
shard_id PKintegerNOT NULL
namespace_id PKbyteaNOT NULL
workflow_id PKvarchar(255)NOT NULL
run_id PKbyteaNOT NULL
next_event_id bigintNOT NULL
last_write_version bigintNOT NULL
data byteaNOT NULL
data_encoding varchar(16)NOT NULL
state byteaNOT NULL
state_encoding varchar(16)NOT NULL
db_record_version bigintNOT NULL0

Indexes

  • none

Referenced by

  • nothing

current_executions

12 cols · no RLS · line 47View in 3D
  • TIMESTAMP without time zone 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.
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
shard_id PKintegerNOT NULL
namespace_id PKbyteaNOT NULL
workflow_id PKvarchar(255)NOT NULL
run_id byteaNOT NULL
create_request_id varchar(255)NOT NULL
state integerNOT NULL
status integerNOT NULL
start_version bigintNOT NULL0
start_time timestampnull
last_write_version bigintNOT NULL
data byteanull
data_encoding varchar(16)NOT NULL''

Indexes

  • none

Referenced by

  • nothing

current_chasm_executions

13 cols · no RLS · line 65View in 3D
  • TIMESTAMP without time zone 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.
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
shard_id PKintegerNOT NULL
namespace_id PKbyteaNOT NULL
business_id PKvarchar(255)NOT NULL
archetype_id PKbigintNOT NULL
run_id byteaNOT NULL
create_request_id varchar(255)NOT NULL
state integerNOT NULL
status integerNOT NULL
start_version bigintNOT NULL0
start_time timestampnull
last_write_version bigintNOT NULL
data byteanull
data_encoding varchar(16)NOT NULL''

Indexes

  • none

Referenced by

  • nothing

buffered_events

7 cols · no RLS · line 84View in 3D
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
shard_id PKintegerNOT NULL
namespace_id PKbyteaNOT NULL
workflow_id PKvarchar(255)NOT NULL
run_id PKbyteaNOT NULL
id PKbigserialNOT NULL
data byteaNOT NULL
data_encoding varchar(16)NOT NULL

Indexes

  • none

Referenced by

  • nothing

chasm_node_maps

9 cols · no RLS · line 298View in 3D
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
shard_id PKintegerNOT NULL
namespace_id PKbyteaNOT NULL
workflow_id PKvarchar(255)NOT NULL
run_id PKbyteaNOT NULL
chasm_path PKbyteaNOT NULL
metadata byteaNOT NULL
metadata_encoding varchar(16)null
data byteanull
data_encoding varchar(16)null

Indexes

  • none

Referenced by

  • nothing

Mutable state maps 6 tables

Per-execution maps keyed by shard, namespace, workflow and run: activities, timers, child workflows, cancel and signal requests.

Entity-relationship diagram: activity_info_maps, timer_info_maps, child_execution_info_maps, request_cancel_info_maps, signal_info_maps, signals_requested_setsactivity_info_mapsshard_id PKintegernamespace_id PKbyteaworkflow_id PKvarchar(255)run_id PKbyteaschedule_id PKbigintdatabyteadata_encodingvarchar(16)timer_info_mapsshard_id PKintegernamespace_id PKbyteaworkflow_id PKvarchar(255)run_id PKbyteatimer_id PKvarchar(255)databyteadata_encodingvarchar(16)child_execution_info_mapsshard_id PKintegernamespace_id PKbyteaworkflow_id PKvarchar(255)run_id PKbyteainitiated_id PKbigintdatabyteadata_encodingvarchar(16)request_cancel_info_mapsshard_id PKintegernamespace_id PKbyteaworkflow_id PKvarchar(255)run_id PKbyteainitiated_id PKbigintdatabyteadata_encodingvarchar(16)signal_info_mapsshard_id PKintegernamespace_id PKbyteaworkflow_id PKvarchar(255)run_id PKbyteainitiated_id PKbigintdatabyteadata_encodingvarchar(16)signals_requested_setsshard_id PKintegernamespace_id PKbyteaworkflow_id PKvarchar(255)run_id PKbyteasignal_id PKvarchar(255)

Relationships

No foreign keys in this domain.

activity_info_maps

7 cols · no RLS · line 227View in 3D
  • 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.
ColumnTypeNullDefaultReferencesNotes
shard_id PKintegerNOT NULL
namespace_id PKbyteaNOT NULL
workflow_id PKvarchar(255)NOT NULL
run_id PKbyteaNOT NULL
schedule_id PKbigintNOT NULL
data byteaNOT NULL
data_encoding varchar(16)null

Indexes

  • none

Referenced by

  • nothing

timer_info_maps

7 cols · no RLS · line 240View in 3D
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
shard_id PKintegerNOT NULL
namespace_id PKbyteaNOT NULL
workflow_id PKvarchar(255)NOT NULL
run_id PKbyteaNOT NULL
timer_id PKvarchar(255)NOT NULL
data byteaNOT NULL
data_encoding varchar(16)null

Indexes

  • none

Referenced by

  • nothing

child_execution_info_maps

7 cols · no RLS · line 252View in 3D
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
shard_id PKintegerNOT NULL
namespace_id PKbyteaNOT NULL
workflow_id PKvarchar(255)NOT NULL
run_id PKbyteaNOT NULL
initiated_id PKbigintNOT NULL
data byteaNOT NULL
data_encoding varchar(16)null

Indexes

  • none

Referenced by

  • nothing

request_cancel_info_maps

7 cols · no RLS · line 264View in 3D
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
shard_id PKintegerNOT NULL
namespace_id PKbyteaNOT NULL
workflow_id PKvarchar(255)NOT NULL
run_id PKbyteaNOT NULL
initiated_id PKbigintNOT NULL
data byteaNOT NULL
data_encoding varchar(16)null

Indexes

  • none

Referenced by

  • nothing

signal_info_maps

7 cols · no RLS · line 276View in 3D
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
shard_id PKintegerNOT NULL
namespace_id PKbyteaNOT NULL
workflow_id PKvarchar(255)NOT NULL
run_id PKbyteaNOT NULL
initiated_id PKbigintNOT NULL
data byteaNOT NULL
data_encoding varchar(16)null

Indexes

  • none

Referenced by

  • nothing

signals_requested_sets

5 cols · no RLS · line 288View in 3D
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
shard_id PKintegerNOT NULL
namespace_id PKbyteaNOT NULL
workflow_id PKvarchar(255)NOT NULL
run_id PKbyteaNOT NULL
signal_id PKvarchar(255)NOT NULL

Indexes

  • none

Referenced by

  • nothing

Event history 2 tables

The append-only history nodes and the branch tree that lets runs share prefixes.

Entity-relationship diagram: history_node, history_treehistory_nodeshard_id PKintegertree_id PKbyteabranch_id PKbyteanode_id PKbiginttxn_id PKbigintprev_txn_idbigintdatabyteadata_encodingvarchar(16)history_treeshard_id PKintegertree_id PKbyteabranch_id PKbyteadatabyteadata_encodingvarchar(16)

Relationships

No foreign keys in this domain.

history_node

8 cols · no RLS · line 313View in 3D

history eventsV2: history_node stores history event data

  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
shard_id PKintegerNOT NULL
tree_id PKbyteaNOT NULL
branch_id PKbyteaNOT NULL
node_id PKbigintNOT NULL
txn_id PKbigintNOT NULL
prev_txn_id bigintNOT NULL0
data byteaNOT NULL
data_encoding varchar(16)NOT NULL

Indexes

  • none

Referenced by

  • nothing

history_tree

5 cols · no RLS · line 327View in 3D

history eventsV2: history_tree stores branch metadata

  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
shard_id PKintegerNOT NULL
tree_id PKbyteaNOT NULL
branch_id PKbyteaNOT NULL
data byteaNOT NULL
data_encoding varchar(16)NOT NULL

Indexes

  • none

Referenced by

  • nothing

Task queues (matching) 6 tables

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.

Entity-relationship diagram: tasks, task_queues, tasks_v2, task_queues_v2, task_queue_user_data, build_id_to_task_queuetasksrange_hash PKbiginttask_queue_id PKbyteatask_id PKbigintdatabyteadata_encodingvarchar(16)task_queuesrange_hash PKbiginttask_queue_id PKbytearange_idbigintdatabyteadata_encodingvarchar(16)tasks_v2range_hash PKbiginttask_queue_id PKbyteapass PKbiginttask_id PKbigintdatabyteadata_encodingvarchar(16)task_queues_v2range_hash PKbiginttask_queue_id PKbytearange_idbigintdatabyteadata_encodingvarchar(16)task_queue_user_datanamespace_id PKbyteatask_queue_name PKvarchar(255)databyteadata_encodingvarchar(16)versionbigintbuild_id_to_task_queuenamespace_id PKbyteabuild_id PKvarchar(255)task_queue_name PKvarchar(255)

Relationships

No foreign keys in this domain.

tasks

5 cols · no RLS · line 96View in 3D
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
range_hash PKbigintNOT NULL
task_queue_id PKbyteaNOT NULL
task_id PKbigintNOT NULL
data byteaNOT NULL
data_encoding varchar(16)NOT NULL

Indexes

  • none

Referenced by

  • nothing

task_queues

5 cols · no RLS · line 107View in 3D

Stores ephemeral task queue information such as ack levels and expiry times

  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
range_hash PKbigintNOT NULL
task_queue_id PKbyteaNOT NULL
range_id bigintNOT NULL
data byteaNOT NULL
data_encoding varchar(16)NOT NULL

Indexes

  • none

Referenced by

  • nothing

tasks_v2

6 cols · no RLS · line 119View in 3D

Stores activity or workflow tasks Used for fairness scheduling. (pass, task_id) are monotonically increasing.

  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
range_hash PKbigintNOT NULL
task_queue_id PKbyteaNOT NULL
pass PKbigintNOT NULLpass for tasks (see stride scheduling algorithm for fairness)
task_id PKbigintNOT NULL
data byteaNOT NULL
data_encoding varchar(16)NOT NULL

Indexes

  • none

Referenced by

  • nothing

task_queues_v2

5 cols · no RLS · line 131View in 3D

Stores ephemeral task queue information such as ack levels and expiry times

  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
range_hash PKbigintNOT NULL
task_queue_id PKbyteaNOT NULL
range_id bigintNOT NULL
data byteaNOT NULL
data_encoding varchar(16)NOT NULL

Indexes

  • none

Referenced by

  • nothing

task_queue_user_data

5 cols · no RLS · line 142View in 3D

Stores task queue information such as user provided versioning data

  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbyteaNOT NULL
task_queue_name PKvarchar(255)NOT NULL
data byteaNOT NULLtemporal.server.api.persistence.v1.TaskQueueUserData
data_encoding varchar(16)NOT NULLEncoding type used for serialization, in practice this should always be proto3
version bigintNOT NULLVersion of this row, used for optimistic concurrency

Indexes

  • none

Referenced by

  • nothing

build_id_to_task_queue

3 cols · no RLS · line 152View in 3D

Stores a mapping between build ids and task queues

  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbyteaNOT NULL
build_id PKvarchar(255)NOT NULL
task_queue_name PKvarchar(255)NOT NULL

Indexes

  • none

Referenced by

  • nothing

History service task queues 7 tables

The internal queues the history service works through: immediate and scheduled tasks, transfer, timer, replication (with its dead-letter queue) and visibility tasks.

Entity-relationship diagram: history_immediate_tasks, history_scheduled_tasks, transfer_tasks, timer_tasks, replication_tasks, replication_tasks_dlq, visibility_taskshistory_immediate_tasksshard_id PKintegercategory_id PKintegertask_id PKbigintdatabyteadata_encodingvarchar(16)history_scheduled_tasksshard_id PKintegercategory_id PKintegervisibility_timestamp PKtimestamptask_id PKbigintdatabyteadata_encodingvarchar(16)transfer_tasksshard_id PKintegertask_id PKbigintdatabyteadata_encodingvarchar(16)timer_tasksshard_id PKintegervisibility_timestamp PKtimestamptask_id PKbigintdatabyteadata_encodingvarchar(16)replication_tasksshard_id PKintegertask_id PKbigintdatabyteadata_encodingvarchar(16)replication_tasks_dlqsource_cluster_name PKvarchar(255)shard_id PKintegertask_id PKbigintdatabyteadata_encodingvarchar(16)visibility_tasksshard_id PKintegertask_id PKbigintdatabyteadata_encodingvarchar(16)

Relationships

No foreign keys in this domain.

history_immediate_tasks

5 cols · no RLS · line 159View in 3D
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
shard_id PKintegerNOT NULL
category_id PKintegerNOT NULL
task_id PKbigintNOT NULL
data byteaNOT NULL
data_encoding varchar(16)NOT NULL

Indexes

  • none

Referenced by

  • nothing

history_scheduled_tasks

6 cols · no RLS · line 169View in 3D
  • TIMESTAMP without time zone 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.
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
shard_id PKintegerNOT NULL
category_id PKintegerNOT NULL
visibility_timestamp PKtimestampNOT NULL
task_id PKbigintNOT NULL
data byteaNOT NULL
data_encoding varchar(16)NOT NULL

Indexes

  • none

Referenced by

  • nothing

transfer_tasks

4 cols · no RLS · line 180View in 3D
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
shard_id PKintegerNOT NULL
task_id PKbigintNOT NULL
data byteaNOT NULL
data_encoding varchar(16)NOT NULL

Indexes

  • none

Referenced by

  • nothing

timer_tasks

5 cols · no RLS · line 189View in 3D
  • TIMESTAMP without time zone 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.
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
shard_id PKintegerNOT NULL
visibility_timestamp PKtimestampNOT NULL
task_id PKbigintNOT NULL
data byteaNOT NULL
data_encoding varchar(16)NOT NULL

Indexes

  • none

Referenced by

  • nothing

replication_tasks

4 cols · no RLS · line 199View in 3D
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
shard_id PKintegerNOT NULL
task_id PKbigintNOT NULL
data byteaNOT NULL
data_encoding varchar(16)NOT NULL

Indexes

  • none

Referenced by

  • nothing

replication_tasks_dlq

5 cols · no RLS · line 208View in 3D
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
source_cluster_name PKvarchar(255)NOT NULL
shard_id PKintegerNOT NULL
task_id PKbigintNOT NULL
data byteaNOT NULL
data_encoding varchar(16)NOT NULL

Indexes

  • none

Referenced by

  • nothing

visibility_tasks

4 cols · no RLS · line 218View in 3D
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
shard_id PKintegerNOT NULL
task_id PKbigintNOT NULL
data byteaNOT NULL
data_encoding varchar(16)NOT NULL

Indexes

  • none

Referenced by

  • nothing

Queues and cluster 6 tables

Generic persistence queues and their metadata, the newer queue tables, cluster metadata and membership.

Entity-relationship diagram: queue, queue_metadata, queues, queue_messages, cluster_metadata_info, cluster_membershipqueuequeue_type PKintegermessage_id PKbigintmessage_payloadbyteamessage_encodingvarchar(16)queue_metadataqueue_type PKintegerdatabyteadata_encodingvarchar(16)versionbigintqueuesqueue_type PKintegerqueue_name PKvarchar(255)metadata_payloadbyteametadata_encodingvarchar(16)queue_messagesqueue_type PKintegerqueue_name PKvarchar(255)queue_partition PKbigintmessage_id PKbigintmessage_payloadbyteamessage_encodingvarchar(16)cluster_metadata_infometadata_partition PKintegercluster_name PKvarchar(255)databyteadata_encodingvarchar(16)versionbigintcluster_membershipmembership_partition PKintegerhost_id PKbytearpc_addressvarchar(128)rpc_portsmallintrolesmallintsession_starttimestamplast_heartbeattimestamprecord_expirytimestamp

Relationships

No foreign keys in this domain.

queue

4 cols · no RLS · line 337View in 3D
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
queue_type PKintegerNOT NULL
message_id PKbigintNOT NULL
message_payload byteaNOT NULL
message_encoding varchar(16)NOT NULL

Indexes

  • none

Referenced by

  • nothing

queue_metadata

4 cols · no RLS · line 345View in 3D
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
queue_type PKintegerNOT NULL
data byteaNOT NULL
data_encoding varchar(16)NOT NULL
version bigintNOT NULL

Indexes

  • none

Referenced by

  • nothing

queues

4 cols · no RLS · line 375View in 3D
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
queue_type PKintegerNOT NULL
queue_name PKvarchar(255)NOT NULL
metadata_payload byteaNOT NULL
metadata_encoding varchar(16)NOT NULL

Indexes

  • none

Referenced by

  • nothing

queue_messages

6 cols · no RLS · line 383View in 3D
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
queue_type PKintegerNOT NULL
queue_name PKvarchar(255)NOT NULL
queue_partition PKbigintNOT NULL
message_id PKbigintNOT NULL
message_payload byteaNOT NULL
message_encoding varchar(16)NOT NULL

Indexes

  • none

Referenced by

  • nothing

cluster_metadata_info

5 cols · no RLS · line 353View in 3D
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
metadata_partition PKintegerNOT NULL
cluster_name PKvarchar(255)NOT NULL
data byteaNOT NULL
data_encoding varchar(16)NOT NULL
version bigintNOT NULL

Indexes

  • none

Referenced by

  • nothing

cluster_membership

8 cols · no RLS · line 362View in 3D
  • TIMESTAMP without time zone 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.
  • TIMESTAMP without time zone 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.
  • TIMESTAMP without time zone 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.
  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
membership_partition PKintegerNOT NULL
host_id PKbyteaNOT NULL
rpc_address varchar(128)NOT NULL
rpc_port smallintNOT NULL
role smallintNOT NULL
session_start timestampnull'1970-01-01 00:00:01+00:00'
last_heartbeat timestampnull'1970-01-01 00:00:01+00:00'
record_expiry timestampnull'1970-01-01 00:00:01+00:00'

Indexes

  • UNIQUE (role, host_id) cm_idx_rolehost
  • (role, last_heartbeat) cm_idx_rolelasthb
  • (rpc_address, role) cm_idx_rpchost
  • (last_heartbeat) cm_idx_lasthb
  • (record_expiry) cm_idx_recordexpiry

Referenced by

  • nothing

Nexus 2 tables

Nexus endpoints and the partition status row that versions them.

Entity-relationship diagram: nexus_endpoints, nexus_endpoints_partition_statusnexus_endpointsid PKbyteadatabyteadata_encodingvarchar(16)versionbigintnexus_endpoints_partition_statusid PKintegerversionbigint

Relationships

No foreign keys in this domain.

nexus_endpoints

4 cols · no RLS · line 399View in 3D

Stores information about Nexus endpoints

  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
id PKbyteaNOT NULL
data byteaNOT NULLtemporal.server.api.persistence.v1.NexusEndpoint
data_encoding varchar(16)NOT NULLEncoding type used for serialization, in practice this should always be proto3
version bigintNOT NULLVersion of this row, used for optimistic concurrency

Indexes

  • none

Referenced by

  • nothing

nexus_endpoints_partition_status

2 cols · no RLS · line 408View in 3D

Stores the version of Nexus endpoints table as a whole

  • Isolated table — 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.
ColumnTypeNullDefaultReferencesNotes
id PKintegerNOT NULL0CHECK id = 0
version bigintNOT NULLVersion of the nexus_endpoints table

Indexes

  • none

Referenced by

  • nothing

Table checks: id = 0

Visibility 1 tables

The standard visibility store: one denormalised row per execution for listing and search.

Entity-relationship diagram: executions_visibilityexecutions_visibilitynamespace_id PKchar(64)run_id PKchar(64)_versionbigintstart_timetimestampexecution_timetimestampworkflow_idvarchar(255)workflow_type_namevarchar(255)statusintegerclose_timetimestamphistory_lengthbiginthistory_size_bytesbigintexecution_durationbigintstate_transition_countbigintmemobyteaencodingvarchar(64)task_queuevarchar(255)search_attributesjsonbparent_workflow_idvarchar(255)parent_run_idvarchar(255)root_workflow_idvarchar(255)root_run_idvarchar(255)temporalchangeversionjsonbbinarychecksumsjsonbbatcheruservarchar(255)temporalscheduledstarttimetimestamptemporalscheduledbyidvarchar(255)temporalschedulepausedbooleantemporalnamespacedivisionvarchar(255)buildidsjsonbtemporalpauseinfojsonbtemporalreportedproblemsjsonbtemporalworkerdeploymentversionvarchar(255)temporalworkflowversioningbehaviorvarchar(255)temporalworkerdeploymentvarchar(255)temporalusedworkerdeploymentversionsjsonbtemporalexternalpayloadsizebytesbiginttemporalexternalpayloadcountbigintbool01booleanbool02booleanbool03booleandatetime01timestampdatetime02timestampdatetime03timestampdouble01numeric(20, 5)double02numeric(20, 5)double03numeric(20, 5)int01bigintint02bigintint03bigintkeyword01varchar(255)keyword02varchar(255)keyword03varchar(255)keyword04varchar(255)keyword05varchar(255)keyword06varchar(255)keyword07varchar(255)keyword08varchar(255)keyword09varchar(255)keyword10varchar(255)text01tsvectortext02tsvectortext03tsvectorkeywordlist01jsonbkeywordlist02jsonbkeywordlist03jsonbtemporalbool01booleantemporalbool02booleantemporaldatetime01timestamptemporaldatetime02timestamptemporaldouble01numeric(20, 5)temporaldouble02numeric(20, 5)temporalint01biginttemporalint02biginttemporalkeyword01varchar(255)temporalkeyword02varchar(255)temporalkeyword03varchar(255)temporalkeyword04varchar(255)temporallowcardinalitykeyword01varchar(255)temporalkeywordlist01jsonbtemporalkeywordlist02jsonb

Relationships

No foreign keys in this domain.

executions_visibility

80 cols · no RLS · line 437View in 3D
  • TIMESTAMP without time zone 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.
  • TIMESTAMP without time zone 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.
  • TIMESTAMP without time zone 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.
  • TIMESTAMP without time zone 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.
  • TIMESTAMP without time zone 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.
  • TIMESTAMP without time zone 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.
  • TIMESTAMP without time zone 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.
  • TIMESTAMP without time zone 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.
  • TIMESTAMP without time zone 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.
  • Isolated table — 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.
  • Wide table (80 columns) — 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.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKchar(64)NOT NULL
run_id PKchar(64)NOT NULL
_version bigintNOT NULL0increasing version, used to reject upserts which are out of order
start_time timestampNOT NULL
execution_time timestampNOT NULL
workflow_id varchar(255)NOT NULL
workflow_type_name varchar(255)NOT NULL
status integerNOT NULLenum WorkflowExecutionStatus {RUNNING, COMPLETED, FAILED, CANCELED, TERMINATED, CONTINUED_AS_NEW, TIMED_OUT}
close_time timestampnull
history_length bigintnull
history_size_bytes bigintnull
execution_duration bigintnull
state_transition_count bigintnull
memo byteanull
encoding varchar(64)NOT NULL
task_queue varchar(255)NOT NULL''
search_attributes jsonbnull
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 jsonbnull
binarychecksums jsonbnull
batcheruser varchar(255)null
temporalscheduledstarttime timestampnull
temporalscheduledbyid varchar(255)null
temporalschedulepaused booleannull
temporalnamespacedivision varchar(255)null
buildids jsonbnull
temporalpauseinfo jsonbnull
temporalreportedproblems jsonbnull
temporalworkerdeploymentversion varchar(255)null
temporalworkflowversioningbehavior varchar(255)null
temporalworkerdeployment varchar(255)null
temporalusedworkerdeploymentversions jsonbnull
temporalexternalpayloadsizebytes bigintnull
temporalexternalpayloadcount bigintnull
bool01 booleannull
bool02 booleannull
bool03 booleannull
datetime01 timestampnull
datetime02 timestampnull
datetime03 timestampnull
double01 numeric(20, 5)null
double02 numeric(20, 5)null
double03 numeric(20, 5)null
int01 bigintnull
int02 bigintnull
int03 bigintnull
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 tsvectornull
text02 tsvectornull
text03 tsvectornull
keywordlist01 jsonbnull
keywordlist02 jsonbnull
keywordlist03 jsonbnull
temporalbool01 booleannull
temporalbool02 booleannull
temporaldatetime01 timestampnull
temporaldatetime02 timestampnull
temporaldouble01 numeric(20, 5)null
temporaldouble02 numeric(20, 5)null
temporalint01 bigintnull
temporalint02 bigintnull
temporalkeyword01 varchar(255)null
temporalkeyword02 varchar(255)null
temporalkeyword03 varchar(255)null
temporalkeyword04 varchar(255)null
temporallowcardinalitykeyword01 varchar(255)null
temporalkeywordlist01 jsonbnull
temporalkeywordlist02 jsonbnull

Indexes

  • (namespace_id, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) default_idx
  • (namespace_id, execution_time, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_execution_time
  • (namespace_id, workflow_id, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_workflow_id
  • (namespace_id, workflow_type_name, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_workflow_type
  • (namespace_id, status, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_status
  • (namespace_id, history_length, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_history_length
  • (namespace_id, history_size_bytes, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_history_size_bytes
  • (namespace_id, execution_duration, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_execution_duration
  • (namespace_id, state_transition_count, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_state_transition_count
  • (namespace_id, task_queue, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_task_queue
  • (namespace_id, parent_workflow_id, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_parent_workflow_id
  • (namespace_id, parent_run_id, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_parent_run_id
  • (namespace_id, root_workflow_id, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_root_workflow_id
  • (namespace_id, root_run_id, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_root_run_id
  • (namespace_id, temporalchangeversion) by_temporal_change_version
  • (namespace_id, binarychecksums) by_binary_checksums
  • (namespace_id, buildids) by_build_ids
  • (namespace_id, temporalpauseinfo) by_temporal_pause_info
  • (namespace_id, temporalreportedproblems) by_temporal_reported_problems
  • (namespace_id, temporalworkerdeploymentversion, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_worker_deployment_version
  • (namespace_id, temporalworkflowversioningbehavior, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_workflow_versioning_behavior
  • (namespace_id, temporalworkerdeployment, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_worker_deployment
  • (namespace_id, temporalusedworkerdeploymentversions) by_used_deployment_versions
  • (namespace_id, batcheruser, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_batcher_user
  • (namespace_id, temporalscheduledstarttime, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_scheduled_start_time
  • (namespace_id, temporalscheduledbyid, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_scheduled_by_id
  • (namespace_id, temporalschedulepaused, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_schedule_paused
  • (namespace_id, temporalnamespacedivision, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_namespace_division
  • (namespace_id, temporalexternalpayloadsizebytes, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_external_payload_size_bytes
  • (namespace_id, temporalexternalpayloadcount, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_external_payload_count
  • (namespace_id, bool01, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_bool_01
  • (namespace_id, bool02, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_bool_02
  • (namespace_id, bool03, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_bool_03
  • (namespace_id, datetime01, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_datetime_01
  • (namespace_id, datetime02, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_datetime_02
  • (namespace_id, datetime03, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_datetime_03
  • (namespace_id, double01, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_double_01
  • (namespace_id, double02, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_double_02
  • (namespace_id, double03, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_double_03
  • (namespace_id, int01, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_int_01
  • (namespace_id, int02, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_int_02
  • (namespace_id, int03, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_int_03
  • (namespace_id, keyword01, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_keyword_01
  • (namespace_id, keyword02, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_keyword_02
  • (namespace_id, keyword03, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_keyword_03
  • (namespace_id, keyword04, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_keyword_04
  • (namespace_id, keyword05, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_keyword_05
  • (namespace_id, keyword06, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_keyword_06
  • (namespace_id, keyword07, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_keyword_07
  • (namespace_id, keyword08, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_keyword_08
  • (namespace_id, keyword09, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_keyword_09
  • (namespace_id, keyword10, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_keyword_10
  • (namespace_id, text01) by_text_01
  • (namespace_id, text02) by_text_02
  • (namespace_id, text03) by_text_03
  • (namespace_id, keywordlist01) by_keyword_list_01
  • (namespace_id, keywordlist02) by_keyword_list_02
  • (namespace_id, keywordlist03) by_keyword_list_03
  • (namespace_id, temporalbool01, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_bool_01
  • (namespace_id, temporalbool02, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_bool_02
  • (namespace_id, temporaldatetime01, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_datetime_01
  • (namespace_id, temporaldatetime02, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_datetime_02
  • (namespace_id, temporaldouble01, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_double_01
  • (namespace_id, temporaldouble02, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_double_02
  • (namespace_id, temporalint01, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_int_01
  • (namespace_id, temporalint02, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_int_02
  • (namespace_id, temporalkeyword01, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_keyword_01
  • (namespace_id, temporalkeyword02, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_keyword_02
  • (namespace_id, temporalkeyword03, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_keyword_03
  • (namespace_id, temporalkeyword04, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_keyword_04
  • (namespace_id, temporallowcardinalitykeyword01, COALESCE(close_time, '9999-12-31 23:59:59'), start_time, run_id) by_temporal_low_cardinality_keyword_01
  • (namespace_id, temporalkeywordlist01) by_temporal_keyword_list_01
  • (namespace_id, temporalkeywordlist02) by_temporal_keyword_list_02

Referenced by

  • nothing