1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
set client_min_messages = 'warning';
set default_with_oids = 'off';
create schema pgq_ext;
grant usage on schema pgq_ext to public;
--
-- batch tracking
--
create table pgq_ext.completed_batch (
consumer_id text not null,
last_batch_id bigint not null,
primary key (consumer_id)
);
--
-- event tracking
--
create table pgq_ext.completed_event (
consumer_id text not null,
batch_id bigint not null,
event_id bigint not null,
primary key (consumer_id, batch_id, event_id)
);
create table pgq_ext.partial_batch (
consumer_id text not null,
cur_batch_id bigint not null,
primary key (consumer_id)
);
--
-- tick tracking for SerialConsumer()
-- no access functions provided here
--
create table pgq_ext.completed_tick (
consumer_id text not null,
last_tick_id bigint not null,
primary key (consumer_id)
);
|