Statement Level Deferred Triggers

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Statement Level Deferred Triggers
Date: 2009-10-23 23:29:24
Message-ID: 200910240129.24602.andres@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message João Eugenio Marynowski 2009-10-24 01:36:01 Re: table corrupted
Previous Message Josh Berkus 2009-10-23 23:04:19 Re: per table random-page-cost?