Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments |
|---|---|---|---|---|---|---|---|---|
| id | text | 2147483647 | null |
|
|
{“what”:“Unique opaque identifier for the task; primary key.”,“why”:“Without it, tasks cannot be referenced or updated individually.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:20:42.757788252+00:00”} |
||
| log_offset | int8 | 19 | null |
|
|
{“what”:“Integer offset that orders tasks in the log; higher means later.”,“why”:“Without it, tasks cannot be ordered or replayed in the same sequence after a crash.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:20:42.786952756+00:00”} |
||
| idempotency_key | text | 2147483647 | null |
|
|
{“what”:“Client-supplied key that identifies a logical operation to deduplicate retries.”,“why”:“Without it, duplicate submissions of the same operation would create multiple tasks.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:20:42.807175563+00:00”} |
||
| device | text | 2147483647 | null |
|
|
{“what”:“Identifier of the device that submitted or should handle the task.”,“why”:“Without it, tasks cannot be routed to the correct device or filtered per device.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:20:42.842472622+00:00”} |
||
| task_type | text | 2147483647 | null |
|
|
{“what”:“Name of the task handler or category, e.g. ‘email.send’.”,“why”:“Without it, the system cannot decide which code path executes the task.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:20:42.863617627+00:00”} |
||
| payload | text | 2147483647 | '{}'::text |
|
|
{“what”:“JSON string with task-specific arguments; empty object if none.”,“why”:“Without it, the task handler has no input data to act on.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:20:42.920321304+00:00”} |
||
| state | text | 2147483647 | 'pending'::text |
|
|
{“what”:“Current lifecycle state: pending, running, succeeded, failed, etc.”,“why”:“Without it, the system cannot know which tasks are actionable or need retry.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:20:42.938864128+00:00”} |
||
| priority | int4 | 10 | 0 |
|
|
{“what”:“Relative importance; higher numbers are processed first.”,“why”:“Without it, all tasks would be equal and urgent work could starve.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:20:42.966510861+00:00”} |
||
| attempt | int4 | 10 | 0 |
|
|
{“what”:“Number of execution attempts already made for this task.”,“why”:“Without it, retry limits and backoff cannot be enforced.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:20:43.034026776+00:00”} |
||
| max_attempts | int4 | 10 | 5 |
|
|
{“what”:“Maximum number of attempts before the task is considered failed.”,“why”:“Without it, tasks could retry forever or give up too early.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:20:43.055292780+00:00”} |
||
| backoff_base_secs | int8 | 19 | 30 |
|
|
{“what”:“Base delay in seconds before the next retry; grows with attempt count.”,“why”:“Without it, retry timing would be arbitrary or fixed, risking overload.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:20:43.068562979+00:00”} |
||
| created_at | text | 2147483647 | null |
|
|
{“what”:“ISO 8601 timestamp when the task was created.”,“why”:“Without it, task age and creation order cannot be determined.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:20:43.093380373+00:00”} |
||
| updated_at | text | 2147483647 | null |
|
|
{“what”:“ISO 8601 timestamp of the last state change.”,“why”:“Without it, stale or stuck tasks cannot be detected.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:20:43.116266155+00:00”} |
||
| scheduled_at | text | 2147483647 | √ | null |
|
|
{“what”:“ISO 8601 timestamp when the task becomes eligible to run; null means immediate.”,“why”:“Without it, delayed or scheduled tasks cannot be represented.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:20:43.144749965+00:00”} |
|
| started_at | text | 2147483647 | √ | null |
|
|
{“what”:“ISO 8601 timestamp when the task first started execution.”,“why”:“Without it, execution duration and stuck tasks cannot be measured.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:20:43.165983733+00:00”} |
|
| completed_at | text | 2147483647 | √ | null |
|
|
{“what”:“ISO 8601 timestamp when the task finished successfully or failed.”,“why”:“Without it, completion time and success/failure timing are unknown.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:20:43.214518065+00:00”} |
|
| error | text | 2147483647 | √ | null |
|
|
{“what”:“Error message from the last failed attempt; null if none.”,“why”:“Without it, failure reasons are lost, hindering debugging.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:20:43.242798798+00:00”} |
|
| topic | text | 2147483647 | √ | null |
|
|
{“what”:“Pub/sub topic or queue name the task belongs to, if any.”,“why”:“Without it, tasks cannot be grouped or routed by topic.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:20:43.287643912+00:00”} |
|
| track | text | 2147483647 | 'local'::text |
|
|
{“what”:“Execution track or environment, e.g. ‘local’ or ‘cloud’.”,“why”:“Without it, tasks cannot be separated by deployment context.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:20:43.369522264+00:00”} |
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| tasks_pkey | Primary key | Asc | id |
| idx_tasks_lane | Performance | Asc/Asc/Asc/Desc/Asc | track + task_type + state + priority + log_offset |
| idx_tasks_scheduled | Performance | Asc/Asc | state + scheduled_at |
| idx_tasks_state_device | Performance | Asc/Asc/Desc/Asc | state + device + priority + log_offset |
| idx_tasks_topic | Performance | Asc/Asc | topic + log_offset |
| tasks_idempotency_key_key | Must be unique | Asc | idempotency_key |
| tasks_log_offset_key | Must be unique | Asc | log_offset |