From: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
---|---|
To: | David Fetter <david(at)fetter(dot)org> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: delta relations in AFTER triggers |
Date: | 2014-07-05 14:38:20 |
Message-ID: | 1404571100.73407.YahooMailNeo@web122303.mail.ne1.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Kevin Grittner <kgrittn(at)ymail(dot)com> wrote:
> 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.
It appears that I need to create a new execution node and a way for
SPI calls to use it. That seems beyond the scope of what is fair
to include in this CF, even if I got something put together in the
next couple days.
FWIW, I think that once I have the other pieces, what I initially
posted is committable as the first patch of a series. A second
patch would add the new execution node and code to allow SPI calls
to use it. The patch that David submitted, as modified by myself
and with further refinements that David is working on would be the
third patch. An implementation in plpgsql, would be the fourth.
Other PLs would be left for people more familiar with those
languages to implement.
What I was hoping for in this CF was a review to confirm the
approach before proceeding to build on this foundation. David
found nothing to complain about, and went to the trouble of writing
code to confirm that it was actually generating complete results
which were usable. Robert doesn't feel this constitutes "a serious
code review". I'm not aware of any changes which are needed to the
pending patch once the follow-on patches are complete. I'm moving
this to Needs Review status. People will have another chance to
review this patch when the other code is available, but if we want
incremental maintenance of materialized views in 9.5, delaying
review of what I have submitted in this CF until the next CF will
put that goal in jeopardy.
The one thing I don't feel great about is that it's using
tuplestores of the actual tuples rather than just their TIDs; but
it seems to me that we need the full tuple to support triggers on
FDWs, so the TID approach would be an optimization for a subset of
the cases, and would probably be more appropriate, if we do it at
all, in a follow-on patch after this is working (although I think
it is an optimization we should get into 9.5 if we are going to do
it). If you disagree with that assessment, now would be a good
time to explain your reasoning.
A minor point is psql tab-completion for the REFERENCING clause.
It seems to me that's not critical, but I might slip it in anyway
before commit.
I took a look at whether I could avoid making OLD and NEW
non-reserved keywords, but I didn't see how to do that without
making FOR at least partially reserved. If someone sees a way to
do this without creating three new unreserved keywords
(REFERENCING, OLD, and NEW) I'm all ears.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-07-05 14:52:39 | Re: postgresql.auto.conf and reload |
Previous Message | Kevin Grittner | 2014-07-05 13:48:38 | unused local variable |