Live data from Hacker News

PostgreSQL views and materialized views and how they influenced TimescaleDB

timescale.com

31–32 of 32 posts

Re: PostgreSQL views and materialized views and how they influenced TimescaleDB

#31
post #27

It’s sad that timescale aggregates don’t work on top of other aggregates. Abstractions is leaking. The ticket is left unaddressed for a while

Hello would like to check in on this with you. You can find my email address in my profile, I am Timescale's community manager. Thanks!

Re: PostgreSQL views and materialized views and how they influenced TimescaleDB

#32
Great approach and good write-up! I’ve implemented a similar technique before on PostgreSQL, but with the materialisation in the application backend. Still works like a charm.

>So instead, we created a special kind of trigger that tracks the minimum and maximum times modified across all the rows in a statement and writes out the range of times that were modified to a log table. We call that an invalidation log.

Does this invalidation log also take into account cases where the view has an aggregate that is based on data from a bucket other than itself? For example, a lag() or lead() might be used to calculate a delta compared to the previous bucket. Then, if a data point inside bucket 1 is added into the realtime table and bucket 1 is invalidated and re-materialised, for integrity reasons also bucket 2 needs to be re-materialised?

Post reply on HN