Re: Feature: temporary materialized views

From: Mitar <mmitar(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Feature: temporary materialized views
Date: 2018-12-27 09:01:48
Message-ID: CAKLmikOwqJx7J=fg7VFcuk2OUjqLy=HZj_J5stY1x8X7+14g5g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

I made a new version of the patch. I added tests and changes to the
docs and made sure various other aspects of this change for as well. I
think this now makes temporary materialized views fully implemented
and that in my view patch is complete. If there is anything else to
add, please let me know, I do not yet have much experience
contributing here. What are next steps? Do I just wait for it to be
included into Commitfest? Do I add it there myself?

Mitar

On Wed, Dec 26, 2018 at 9:00 AM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
>
> On 2018-Dec-25, Mitar wrote:
>
> > Sometimes materialized views are used to cache a complex query on
> > which a client works. But after client disconnects, the materialized
> > view could be deleted. Regular VIEWs and TABLEs both have support for
> > temporary versions which get automatically dropped at the end of the
> > session. It seems it is easy to add the same thing for materialized
> > views as well. See attached PoC patch.
>
> I think MVs that are dropped at session end are a sensible feature. I
> probably wouldn't go as far as allowing ON COMMIT actions, though, so
> this much effort is the right amount.
>
> I think if you really want to do this you should just use OptTemp, and
> delete OptNoLog. Of course, you need to add tests and patch the docs.
>
> --
> Álvaro Herrera https://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

--
http://mitar.tnode.com/
https://twitter.com/mitar_m

Attachment Content-Type Size
tempmatviews-v2.patch text/x-patch 11.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2018-12-27 10:04:09 Re: [HACKERS] REINDEX CONCURRENTLY 2.0
Previous Message Fabien COELHO 2018-12-27 08:52:31 Re: Offline enabling/disabling of data checksums