Tables

Schema ‘pgq_node’, contains tables for cascaded pgq.

Event types for cascaded queue

pgq.location-infoev_data: node_name, extra1: queue_name, extra2: location, extra3: dead It contains updated node connect string.
pgq.global-watermarkev_data: tick_id, extra1: queue_name Root node sends minimal tick_id that must be kept.
pgq.tick-idev_data: tick_id, extra1: queue_name Partition node inserts its tick-id into combined queue.
Summary
TablesSchema ‘pgq_node’, contains tables for cascaded pgq.
pgq_node.node_locationStatic table that just lists all members in set.
pgq_node.node_infoLocal node info.
pgq_node.local_stateAll cascaded consumers (both worker and non-worker) keep their state here.
pgq_node.subscriber_infoList of nodes that subscribe to local node.

pgq_node.node_location

Static table that just lists all members in set.

Columns

queue_namecascaded queue name
node_namenode name
node_locationlibpq connect string for connecting to node
deadwhether the node is offline

pgq_node.node_info

Local node info.

Columns

queue_namecascaded queue name
node_typelocal node type
node_namelocal node name
worker_nameconsumer name that maintains this node
combined_queueon ‘leaf’ the target combined set name
node_attrsurlencoded fields for worker

Node types

rootdata + batches is generated here
branchreplicates full queue contents and maybe contains some tables
leafdoes not replicate queue / or uses combined queue for that

pgq_node.local_state

All cascaded consumers (both worker and non-worker) keep their state here.

Columns

queue_namecascaded queue name
consumer_namecascaded consumer name
provider_nodenode name the consumer reads from
last_tick_idlast committed tick id on this node
cur_errorreason why current batch failed
pausedwhether consumer should wait
uptodateif consumer has seen new state

pgq_node.subscriber_info

List of nodes that subscribe to local node.

Columns

queue_namecascaded queue name
subscriber_nodenode name that uses this node as provider.
worker_nameconsumer name that maintains remote node
Close