Re: refresh materialized view concurrently - Mailing list pgsql-hackers

From Robert Haas
Subject Re: refresh materialized view concurrently
Date
Msg-id CA+TgmoaSzzJdvB6oBYC3no=rf57Tw1_28BGeZbH4+9o=-a10qA@mail.gmail.com
Whole thread Raw
In response to Re: refresh materialized view concurrently  (Hitoshi Harada <umi.tanuki@gmail.com>)
Responses Re: refresh materialized view concurrently
List pgsql-hackers
On Tue, Jul 2, 2013 at 4:02 AM, Hitoshi Harada <umi.tanuki@gmail.com> wrote:
> Other than these, I've found index is opened with NoLock, relying on
> ExclusiveLock of parent matview, and ALTER INDEX SET TABLESPACE or something
> similar can run concurrently, but it is presumably safe.  DROP INDEX,
> REINDEX would be blocked by the ExclusiveLock.

I doubt very much that this is safe.  And even if it is safe today, I
think it's a bad idea, because we're likely to try to reduce lock
levels in the future.  Taking no lock on a relation we're opening,
even an index, seems certain to be a bad idea.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Custom gucs visibility
Next
From: Andres Freund
Date:
Subject: Re: extensible external toast tuple support