Re: Materialized views WIP patch

From: Greg Stark <stark(at)mit(dot)edu>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>
Cc: Ants Aasma <ants(at)cybertec(dot)at>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Materialized views WIP patch
Date: 2013-03-03 22:47:50
Message-ID: CAM-w4HOJXy=kh8O=_t7BE9Ea_6Oj6bH2x_L74eV=GcJcJDL0Cw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Sat, Mar 2, 2013 at 3:06 PM, Kevin Grittner <kgrittn(at)ymail(dot)com> wrote:
>
> (1) Any DML against the MV would need to be limited to some
> context fired by the underlying changes. If we allow changes to
> the MV outside of that without it being part of some "updateable
> MV" feature (reversing the direction of flow of changes), the MV
> could not be trusted at all. If you're going to do that, just use
> a table.

Oh! I misunderstood what you were suggesting. I think we were talking
at cross-purposes.

You're imagining a user issues truncate against the underlying
table(s) and the code that handles updating the materialized view will
need to issue a truncate against the MV to update it.

I was imagining that you wanted to be able to issue DML against the MV
just as one can against an updateable view. That DML should propagate
to the underlying table(s) through various magic.

It's a pretty theoretical fear now but one day it may be important to
avoid confusion between these two.

--
greg

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Nicolas Barbier 2013-03-03 23:01:18 Re: Materialized views WIP patch
Previous Message Tom Lane 2013-03-03 22:40:22 pgsql: Fix SQL function execution to be safe with long-lived FmgrInfos.

Browse pgsql-hackers by date

  From Date Subject
Next Message Nicolas Barbier 2013-03-03 23:01:18 Re: Materialized views WIP patch
Previous Message Tom Lane 2013-03-03 22:32:17 Re: Fix pgstattuple/pgstatindex to use regclass-type as the argument