pgsync icon indicating copy to clipboard operation
pgsync copied to clipboard

Documentation: PgSync with Postgres Materialized Views

Open navyamehta opened this issue 4 years ago • 6 comments

Can we have additional documentation on how pgsync works with Postgres Materialized Views? Should the name of the view be the 'table' name in the schema? When the view is concurrently refreshed, does pgsync only sync the changes in the view with elastic-search (like it does with tables), or re-add every entry in the view? I'd really recommend some clarification on how views would work with pgsync. Thanks!

navyamehta avatar Sep 16 '21 21:09 navyamehta

Materialized views are not yet supported. I did some analysis on this a while back but it's not quite not finished.

toluaina avatar Sep 17 '21 20:09 toluaina

I enthusiastically support this enhancement. We're retooling an application funded by NIH that aggregates 10+ large data sources that we stage into Postgres as raw XML and JSON and then use materialized views to unroll the structures. We're currently indexing using the bare Lucene APIs, and PgSync offers us a perfect means to cleanly transition to ElasticSearch. If I can avoid having to stage the materialized views into actual tables, we've a perfect solution.

eichmann avatar Oct 10 '21 21:10 eichmann

Will revisit this shortly.

toluaina avatar Oct 21 '21 19:10 toluaina

Hello, I read that materialized view are not supported, is that changed? Thank you

lorenzovilla avatar May 03 '22 13:05 lorenzovilla

This is currently in progress. Will keep you updated.

toluaina avatar May 05 '22 21:05 toluaina

Support for views is now detailed here

toluaina avatar May 14 '22 15:05 toluaina