Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Catalog Tables

pg_tide stores all state in relational tables within the tide schema. This page documents the underlying tables that power the SQL API.


tide.tide_outbox_config

One row per named outbox.

ColumnTypeDescription
outbox_nameTEXT (PK)Unique outbox identifier
retention_hoursINTHours to retain consumed messages
inline_thresholdINTDeprecated compatibility value; not a native pending-row cap
enabledBOOLEANWhether publishing is allowed
created_atTIMESTAMPTZCreation timestamp

tide.tide_outbox_messages

Shared message store for all outboxes.

ColumnTypeDescription
idBIGINT (PK)Auto-incrementing message ID
outbox_nameTEXT (FK)Which outbox this belongs to
payloadJSONBMessage body
headersJSONBMessage metadata
created_atTIMESTAMPTZPublication time
consumed_atTIMESTAMPTZLegacy/global-consumer status; not authoritative for native delivery
consumer_groupTEXTWhich group consumed it

Indexes:

  • idx_tide_outbox_messages_poll — unconditional (outbox_name, id) index for native relay polling
  • cleanup-supporting indexes selected by the operational query plans

The parent remains public when optional ID-range partitions are enabled. Child names are numeric bounds, not logical outbox names.


tide.tide_consumer_groups

Named consumer groups with offset reset policy.

ColumnTypeDescription
group_nameTEXT (PK)Unique group name
outbox_nameTEXT (FK)Outbox being consumed
auto_offset_resetTEXTearliest, latest, or none
created_atTIMESTAMPTZCreation timestamp

tide.tide_consumer_offsets

Per-consumer committed offsets and heartbeats.

ColumnTypeDescription
group_nameTEXT (PK, FK)Consumer group
consumer_idTEXT (PK)Consumer instance identifier
committed_offsetBIGINTLast processed message ID
last_heartbeatTIMESTAMPTZLast liveness signal

tide.tide_consumer_leases

Visibility leases for in-flight message batches.

ColumnTypeDescription
group_nameTEXT (PK, FK)Consumer group
consumer_idTEXT (PK, FK)Consumer instance
lease_startBIGINTFirst message ID in the leased batch
lease_endBIGINTLast message ID in the leased batch
expires_atTIMESTAMPTZWhen the lease expires

tide.tide_inbox_config

Named inbox configurations.

ColumnTypeDescription
inbox_nameTEXT (PK)Unique inbox identifier
inbox_schemaTEXTSchema containing the inbox table
max_retriesINTAttempts before DLQ
processed_retention_hoursINTHours to keep processed messages
dlq_retention_hoursINTHours to keep DLQ messages
created_atTIMESTAMPTZCreation timestamp

tide.relay_outbox_config

Forward relay pipeline definitions.

ColumnTypeDescription
nameTEXT (PK)Unique pipeline name
enabledBOOLEANWhether the pipeline is active
configJSONBFull pipeline config (outbox, sink, params)

Triggers: relay_outbox_config_notify — fires pg_notify('tide_relay_config', ...) on changes.


tide.relay_inbox_config

Reverse relay pipeline definitions.

ColumnTypeDescription
nameTEXT (PK)Unique pipeline name
enabledBOOLEANWhether the pipeline is active
configJSONBFull pipeline config (inbox, source, params)

Triggers: relay_inbox_config_notify — fires pg_notify('tide_relay_config', ...) on changes.


tide.relay_consumer_offsets

Durable per-pipeline offset tracking for the relay binary.

ColumnTypeDescription
relay_group_idTEXT (PK)Relay deployment group
pipeline_idTEXT (PK)Pipeline name
outbox_nameTEXT (PK)Logical outbox scope
last_change_idBIGINTHighest acknowledged message ID
updated_atTIMESTAMPTZLast update timestamp

The primary key is (relay_group_id, pipeline_id, outbox_name). Offset writes are monotonic, so a lower acknowledgment cannot rewind a higher stored value.


tide.outbox_cleanup_state

One row per outbox recording the last successful bounded sweep:

ColumnTypeDescription
outbox_nameTEXT (PK)Logical outbox
last_success_atTIMESTAMPTZLast committed cleanup
last_safe_offsetBIGINTMinimum participant checkpoint used
highest_deleted_idBIGINTHighest deleted message ID
last_batch_rowsBIGINTRows deleted by the last batch
cumulative_rows_deletedBIGINTTotal rows deleted
last_duration_msDOUBLE PRECISIONLast batch duration
last_partition_actionTEXTPartition action or none

The state is updated in the same transaction as deletion or partition removal.

tide.outbox_storage_config

Singleton physical-layout contract:

ColumnTypeDescription
layoutTEXTheap, id_range, or legacy_noncanonical
partition_spanBIGINTID range for future children
premakeINTEGERFuture children to maintain
last_maintenance_atTIMESTAMPTZLast successful provisioning

tide.tide_partition_events

Bounded maintenance audit rows for child creation, default-partition drains, detach/drop decisions, and failures. It contains no payloads.

tide.outbox_retention_status and tide.relay_pipeline_lag

These views expose the offset-aware retention contract and exact per-pipeline lag described in the Outbox API. Prefer them over outbox_pending and consumer_lag for native operational decisions.