Re: REFRESH MATERIALIZED VIEW locklevel

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: REFRESH MATERIALIZED VIEW locklevel
Date: 2013-03-07 17:55:39
Message-ID: 1362678939.69291.YahooMailNeo@web162904.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy pgsql-hackers

Andres Freund <andres(at)2ndquadrant(dot)com> wrote:

> if I understand things correctly REFRESH MATERIALIZED VIEW locks
> the materialized view with an AcessExclusiveLock even if the view
> already contains data.

Yeah.  At the time I had to make a decision on that, REINDEX
CONCURRENTLY did not seem reliable with a weaker lock, and REFRESH
MATERIALIZED VIEW has to rebuild indexes (among other things).  If
we have all the issues sorted out with REINDEX CONCURRENTLY then
the same techniques will probably apply to RMV without too much
difficulty.  It's a bit late to think about that for 9.3, though.

> I am pretty sure that will - understandably - confuse users, so I
> vote for at least including a note about that in the docs.

Will see about working that in.

-Kevin

--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-advocacy by date

  From Date Subject
Next Message Andres Freund 2013-03-07 18:23:55 Re: REFRESH MATERIALIZED VIEW locklevel
Previous Message Peter Geoghegan 2013-03-07 17:36:29 Re: REFRESH MATERIALIZED VIEW locklevel

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-03-07 18:23:55 Re: REFRESH MATERIALIZED VIEW locklevel
Previous Message Kevin Grittner 2013-03-07 17:42:48 Re: odd behavior in materialized view