Re: 9.3 Beta 1 Coming Soon! - Mailing list pgsql-advocacy

From Simon Riggs
Subject Re: 9.3 Beta 1 Coming Soon!
Date
Msg-id CA+U5nM+Lvkrnj2OamML=Si4Zu3vrfFz5ammuQJg3RBfhrbGG1A@mail.gmail.com
Whole thread Raw
In response to Re: 9.3 Beta 1 Coming Soon!  (Josh Berkus <josh@agliodbs.com>)
List pgsql-advocacy
On 17 April 2013 17:51, Josh Berkus <josh@agliodbs.com> wrote:

> Regrading MatViews, let me explain why the Refresh locking isn't the
> albatross which some people think it is.   Currently, my clients, and
> several OSS projects, have many applications which currently use tables
> as materialized views.  The common way to handle these is "BEGIN;
> TRUNCATE matview; INSERT INTO matview SELECT ...; COMMIT;".   This
> produces the *exact same* locking pattern as the current REFRESH.  While
> more lock-sensitive patterns are possible, that doesn't mean people are,
> in the mainstream, using them.

I agree that the above code has exactly the same locking pattern as a refresh.

Only trouble is that isn't the best way of doing it, nor in my
experience the common way of doing it.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-advocacy by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Heroku early upgrade is raising serious questions
Next
From: Simon Riggs
Date:
Subject: Re: 9.3 Beta 1 Coming Soon!