Re: Feature: temporary materialized views - Mailing list pgsql-hackers

From Mitar
Subject Re: Feature: temporary materialized views
Date
Msg-id CAKLmikO1dSEGaz3juUCJYdYR2kgoqKbAyM7zbFe+9HoYpPTP-w@mail.gmail.com
Whole thread Raw
In response to Re: Feature: temporary materialized views  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Feature: temporary materialized views  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: Feature: temporary materialized views  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Hi!

On Wed, Dec 26, 2018 at 9:00 AM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
> I think MVs that are dropped at session end are a sensible feature.

Thanks.

> I probably wouldn't go as far as allowing ON COMMIT actions, though

I agree. I do not see much usefulness for it. The only use case I can
think of would be to support REFRESH as an ON COMMIT action. That
would be maybe useful in the MV setting. After every transaction in my
session, REFRESH this materialized view.

But personally I do not have an use case for that, so I will leave it
to somebody else. :-)

> I think if you really want to do this you should just use OptTemp, and
> delete OptNoLog.

Sounds good.

OptTemp seems to have a misleading warning in some cases when it is
not used on tables though:

"GLOBAL is deprecated in temporary table creation"

Should we change this language to something else? "GLOBAL is
deprecated in temporary object creation"? Based on grammar it seems to
be used for tables, views, sequences, and soon materialized views.

> Of course, you need to add tests and patch the docs.

Sure.

[1] https://www.postgresql.org/message-id/29165.1545842105%40sss.pgh.pa.us


Mitar

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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: reducing the footprint of ScanKeyword (was Re: Large writable variables)
Next
From: Pavel Stehule
Date:
Subject: Re: Feature: temporary materialized views