I have two continuous views: tikets2
and second_view
CREATE CONTINUOUS VIEW tickets2 AS
SELECT ticketid,
TO_TIMESTAMP(min(event_time)::double precision /1000000) as t0,
keyed_min(event_time, status) as t0_status,
TO_TIMESTAMP(max(event_time)::double precision /1000000) as tc,
keyed_max(event_time, status) as tc_status
FROM tickets_stream2
group by ticketid;
CREATE CONTINUOUS VIEW second_view AS
SELECT (new).tc FROM output_of('tickets2’);
When I insert data into tickets_stream2
, I get an assertion error.
TRAP: FailedAssertion("!(ActiveSnapshotSet())", File: "postgres.c", Line: 824, PID: 5275, Query: tickets2)
Removing second_view
, the data insertion into tickets_stream2
executes without problems.
I can't figure out what I am missing.
Obs. I am using PipelineDB 0.9.7
EDIT:
Meanwhile I tried without the TO_TIMESTAMP() function and no exception occurred.
CREATE CONTINUOUS VIEW tickets2 AS
SELECT
ticketid,
min(event_time) as t0,
keyed_min(event_time, status) as t0_status,
max(event_time) as tc,
keyed_max(event_time, status) as tc_status
FROM tickets_stream_test_output
GROUP BY ticketid;
EDIT 2, with 0.9.7u3 (may be useful for others)
I tested with the updated version. I'm not getting the assertion failure anymore, but still an error occurs when I insert data into test_version_stream.
CREATE STREAM test_version_stream(event_time bigint, ticketid uuid, status text);
CREATE CONTINUOUS VIEW test_version_view AS
SELECT ticketid,
TO_TIMESTAMP(min(event_time)::double precision /1000000) as t
FROM test_version_stream
GROUP BY ticketid;
CREATE CONTINUOUS VIEW e_test_version_view AS
SELECT (new).t FROM output_of('test_version_view');
I changed the order of functions min
and to_timestamp
and all went fine :)
This issue has been fixed with the latest update to the 0.9.7 release: