Re: 9.3 Beta 1 Coming Soon!

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: PostgreSQL Advocacy <pgsql-advocacy(at)postgresql(dot)org>
Subject: Re: 9.3 Beta 1 Coming Soon!
Date: 2013-04-18 08:09:10
Message-ID: CA+U5nM+Lvkrnj2OamML=Si4Zu3vrfFz5ammuQJg3RBfhrbGG1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy

On 17 April 2013 17:51, Josh Berkus <josh(at)agliodbs(dot)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

In response to

Browse pgsql-advocacy by date

  From Date Subject
Next Message Simon Riggs 2013-04-18 08:11:40 Re: 9.3 Beta 1 Coming Soon!
Previous Message Stephen Frost 2013-04-18 00:04:46 Re: Heroku early upgrade is raising serious questions