Re: Materialized views WIP patch - Mailing list pgsql-hackers

From Albe Laurenz
Subject Re: Materialized views WIP patch
Date
Msg-id D960CB61B694CF459DCFB4B0128514C208B87E13@exadv11.host.magwien.gv.at
Whole thread Raw
In response to Re: Materialized views WIP patch  ("Kevin Grittner" <kgrittn@mail.com>)
List pgsql-hackers
Josh Berkus wrote:
>> It would be nice for the user to have some way to know that a matview is
>> empty due to never being LOADed or recently being TRUNCATEd. However, I
>> don't think that relisvalid flag -- and preventing scanning the relation
>> -- is a good solution. What I'd rather have instead is a timestamp of
>> when the MV was last LOADed. If the MV was never loaded (or was
>> truncated) that timestamp would be NULL. Such a timestamp would allow
>> users to construct all kinds of ad-hoc refresh schemes for MVs which
>> would not be possible without it.

+1

Kevin Grittner wrote:
> I see your point there; I'll think about that. My take was more that MVs
> would often be refreshed by crontab, and that you would want to keep
> subsequent steps from running and generating potentially plausible but
> completely inaccurate results if the LMV failed.

If one of these subsequent steps doesn't care if refresh
failed once, it shouldn't be forced to fail.  I imagine
that for many applications yesterday's data can be good enough.

Those that care should check the timestamp.

Yours,
Laurenz Albe

pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: pg_dump --split patch
Next
From: Andres Freund
Date:
Subject: Re: logical changeset generation v3