From: | Kevin Grittner <kgrittn(at)gmail(dot)com> |
---|---|
To: | Nico Williams <nico(at)cryptonector(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: delta relations in AFTER triggers |
Date: | 2017-01-20 19:37:33 |
Message-ID: | CACjxUsOkqrSkzeRS92-7bDJw7PxEYudhn4_YV8GbG-2zk1CY6w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jan 19, 2017 at 4:14 PM, Nico Williams <nico(at)cryptonector(dot)com> wrote:
> I hope what I've done about delta relations will be mostly irrelevant
> given your patch (which I've not looked at in detail),
Reviews welcome!
> but just FYI,
> I've built an alternate, all-SQL-coded materialized view system that
> captures deltas between refreshes and deltas from direct DMLs of the
> materialized view:
There is currently plenty of room for pseudo-MV implementations,
and may be for a while. It's a good indication of the need for the
feature in core. An implementation in the guts of core can have
advantages that nothing else can, of course. For example, for
eager application of the deltas, nothing will be able to beat
capturing tuples already in RAM and being looked at for possible
trigger firing into a RAM-with-spill-to-disk tuplestore.
> https://github.com/twosigma/postgresql-contrib/blob/master/pseudo_mat_views.sql
>
> There are some good ideas there, IMO, even if that implementation were
> useless because of your patch.
I don't have time to review what you've done right now, but will
save that link to look at later, if you give permission to borrow
from it (with proper attribution, of course) if there is something
that can advance what I'm doing. If such permission is not
forthcoming, I will probably avoid looking at it, to avoid any
possible copyright issues.
> Incidentally, it's really nice that PG has some "higher order" SQL
> features that make this sort of thing easier. In particular, here, row
> values and record types, and being able to refer to a table as a column
> of the table's record type.
Yeah, I found that quite handy in developing the REFRESH feature,
and expect to be using it in incremental maintenance.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2017-01-20 19:45:43 | Re: Parallel Index Scans |
Previous Message | Kevin Grittner | 2017-01-20 19:26:54 | Re: delta relations in AFTER triggers |