Friendly greetings !
You may want to take a look at a postgresql "fork" called pipelinedb :
https://www.pipelinedb.com/
https://github.com/pipelinedb/pipelinedb
I'm not working for them, not using it, but i happen to know it exist :)
*hugs*
--
Laurent "ker2x" Laborde