On Wed, May 27, 2015 at 01:55:24PM +0300, Jordan Gigov wrote: > Updating a materialized view in my case. It should only update when 2-3 of > our 30+ tables get new data, which for those is kind of rare. Not having > such a trigger means I will have to call it in each usage in the code and > hope future maintainers don't forget it. This is why I postponed migrating > the one search query where materialized views would be useful, because it's > heavy.
Add daemon which runs "LISTEN", and triggers on the underlying tables that do NOTIFY. When daemon picks something from LISTEN (which happens only after commit) - it can do anything that needs to be done, and it will not block the transaction, which is an added benefit. depesz -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers