Re:Some SQL Tricks of an Application DBA
by Normal_gaussian on Wednesday July 29, 2020 @09:12PM
(#23993323)
Yes, this is a killer feature. There are many instances of what are essentially application side caches that try (and often fail) to do this; its non-trivial to do right, and I am greatly looking forwards to it.
In particular, an event-sourced world becomes much easier to implement and maintain with the DB handling all the incremental magic.
It's my understanding that there is a proposed feature, with a proof-of-concept floating around, called "Incremental View Maintenance", which is auto-update of dependent Materialized Views when their dependent base-tables change.
https://wiki.postgresql.org/wiki/Incremental_View_Maintenanc...
I think there are some performance/technical things that are getting sorted out with this, but it would be a killer feature.It's the one thing I wish Postgres had that it doesn't. You have to use triggers to do this currently.