Re: Materialized views WIP patch

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Materialized views WIP patch
Date: 2012-11-19 18:01:51
Message-ID: 50AA740F.90408@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/19/12 9:57 AM, Josh Berkus wrote:
> Kevin,
>
>> I'm looking at whether there is some reasonable way to detect invalid
>> data as well as capture age of data. Every solution I've thought of
>> so far has at least one hard-to-solve race condition, but I have
>> hopes that I can either solve that for one of the ideas, or come up
>> with an idea which falls more gracefully under MVCC management.
>
> What's the race condition? I'd think that LOAD would take an exclusive
> lock on the matview involved.

BTW, another thought on the timestamp: while it would be better to have
a lastrefresh timestamp in pg_class, the other option is to have an
extra column in the matview (pg_last_update). While that would involve
some redundant storage, it would neatly solve the issues around unlogged
matviews; the timestamp and the data would vanish at the same time.

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Atri Sharma 2012-11-19 18:20:24 Re: Do we need so many hint bits?
Previous Message Josh Berkus 2012-11-19 17:57:44 Re: Materialized views WIP patch