in i_set_name text,
in i_node_type text,
in i_node_name text,
+ in i_worker_name text,
in i_provider_name text,
in i_global_watermark bigint,
in i_combined_set text,
insert into pgq_set.set_info
(set_name, node_type, node_name, queue_name,
- provider_node, combined_set, global_watermark)
+ provider_node, combined_set, global_watermark, worker_name)
values (i_set_name, i_node_type, i_node_name, _queue_name,
- i_provider_name, i_combined_set, _global_wm);
+ i_provider_name, i_combined_set, _global_wm, i_worker_name);
if i_node_type not in ('root', 'combined-root') then
insert into pgq_set.completed_tick (set_name, tick_id)
out global_watermark bigint,
out local_watermark bigint,
out completed_tick bigint,
+ out worker_name text,
out provider_node text,
out provider_location text,
select n.node_type, n.node_name, t.tick_id, n.queue_name,
c.set_name, c.node_type, c.queue_name, n.global_watermark,
n.provider_node, n.paused, n.resync, n.up_to_date,
- p.node_location
+ p.node_location, n.worker_name
into node_type, node_name, completed_tick, queue_name,
combined_set, combined_type, combined_queue, global_watermark,
provider_node, paused, resync, up_to_date,
- provider_location
+ provider_location, worker_name
from pgq_set.set_info n
left join pgq_set.completed_tick t on (t.set_name = n.set_name)
left join pgq_set.set_info c on (c.set_name = n.combined_set)
select * from pgq_set.remove_member('aset', 'node4');
select * from pgq_set.get_member_info('aset');
-select * from pgq_set.create_node('aset', 'root', 'node1', null, null, null);
+select * from pgq_set.create_node('aset', 'root', 'node1', 'worker', null, null, null);
select * from pgq_set.get_node_info('aset');
resync boolean not null default false,
up_to_date boolean not null default false,
+ worker_name text not null,
+
foreign key (set_name, node_name) references pgq_set.member_info,
foreign key (set_name, provider_node) references pgq_set.member_info,
check (node_type in ('root', 'branch', 'leaf', 'combined-root', 'combined-branch', 'merge-leaf')),