Statement Level Deferred Triggers - Mailing list pgsql-hackers

From Andres Freund
Subject Statement Level Deferred Triggers
Date
Msg-id 200910240129.24602.andres@anarazel.de
Whole thread Raw
Responses Re: Statement Level Deferred Triggers
Re: Statement Level Deferred Triggers
List pgsql-hackers
Hi all,

I would like to hear some opinions before starting to take a stab at 
implementing $subject.
My current use case is updating materialized views at the end of the 
transaction so that they appear consistent to the outside.
Updating them on every row changed is far too expensive - so every change is 
logged and depending on the size of the changeset the views are recomputed 
completely or incrementally.
Currently this is hacked up by using deferred constraint triggers - which are 
row level only... (i.e. the first run trigger deletes the whole changelog so 
that all following triggers have nearly nothing to do).
This is neither nice from an architectural point nor from an performance 
angle.

I am sure most of you can think of other use cases.

Opinions? 

Andres



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: per table random-page-cost?
Next
From: João Eugenio Marynowski
Date:
Subject: Re: table corrupted