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

From Noah Misch
Subject Re: Materialized views WIP patch
Date
Msg-id 20130714204526.GB11636@tornado.leadboat.com
Whole thread Raw
In response to Re: Materialized views WIP patch  (Noah Misch <noah@leadboat.com>)
Responses Re: Materialized views WIP patch
List pgsql-hackers
While doing some post-commit review of the 9.3 materialized view feature, I
noticed a few loose ends:

On Thu, Jan 24, 2013 at 01:09:28PM -0500, Noah Misch wrote:
> Note that [...] "ALTER TABLE ... RENAME CONSTRAINT" [is]
> currently supported for MVs by ALTER TABLE but not by ALTER MATERIALIZED VIEW.
> 
> There's no documented support for table constraints on MVs, but UNIQUE
> constraints are permitted:
> 
> [local] test=# alter materialized view mymv add unique (c);
> ALTER MATERIALIZED VIEW
> [local] test=# alter materialized view mymv add check (c > 0);
> ERROR:  "mymv" is not a table
> [local] test=# alter materialized view mymv add primary key (c);
> ERROR:  "mymv" is not a table or foreign table

The above points still apply.

Also, could you explain the use of RelationCacheInvalidateEntry() in
ExecRefreshMatView()?  CacheInvalidateRelcacheByRelid() followed by
CommandCounterIncrement() is the typical pattern; this is novel.  I suspect,
though, neither is necessary now that the relcache does not maintain populated
status based on a fork size reading.

Thanks,
nm

-- 
Noah Misch
EnterpriseDB                                 http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: Improvement of checkpoint IO scheduler for stable transaction responses
Next
From: james
Date:
Subject: Re: Improvement of checkpoint IO scheduler for stable transaction responses