Re: delta relations in AFTER triggers - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: delta relations in AFTER triggers
Date
Msg-id 1403966110.84913.YahooMailNeo@web122303.mail.ne1.yahoo.com
Whole thread Raw
In response to Re: delta relations in AFTER triggers  (David Fetter <david@fetter.org>)
Responses Re: delta relations in AFTER triggers  (David Fetter <david@fetter.org>)
Re: delta relations in AFTER triggers  (Robert Haas <robertmhaas@gmail.com>)
Re: delta relations in AFTER triggers  (Kevin Grittner <kgrittn@ymail.com>)
List pgsql-hackers
David Fetter <david@fetter.org> wrote:
> On Sat, Jun 21, 2014 at 11:06:26AM -0700, Kevin Grittner wrote:

>> Here is v2.

> I've taken the liberty of making an extension that uses this.
> Preliminary tests indicate a 10x performance improvement over the
> user-space hack I did that's similar in functionality.

Wow, this goes well beyond what I expected for a review!  Thanks!

As I said in an earlier post, I think that this is best committed
as a series of patches, one for the core portion and one for each
PL which implements the ability to use the transition (delta)
relations in AFTER triggers.  Your extension covers the C trigger
angle, and it seems to me to be worth committing to contrib as a
sample of how to use this feature in C.

It is very encouraging that you were able to use this without
touching what I did in core, and that it runs 10x faster than the
alternatives before the patch.

Because this review advances the patch so far, it may be feasible
to get it committed in this CF.  I'll see what is needed to get
there and maybe have a patch toward that end in a few days.  The
minimum that would require, IMV, is a plpgsql implementation,
moving the new pg_trigger columns to the variable portion of the
record so they can be null capable, more docs, and regression
tests.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Spinlocks and compiler/memory barriers
Next
From: Pavel Stehule
Date:
Subject: Re: proposal: ignore null fields in not relation type composite type based constructors