Re: refresh materialized view concurrently

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: Kevin Grittner <kgrittn(at)ymail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: refresh materialized view concurrently
Date: 2013-06-17 12:21:48
Message-ID: CA+U5nMJnMHHBCw_Q5vmBqWzoctpRY68ubOzEWsLEip2XQ+2DrA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 17 June 2013 12:13, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> wrote:
> On 14.06.2013 19:05, Kevin Grittner wrote:
>>
>> Attached is a patch for REFRESH MATERIALIZED VIEW CONCURRENTLY for
>> 9.4 CF1. The goal of this patch is to allow a refresh without
>> interfering with concurrent reads, using transactional semantics.
>>
>> It is my hope to get this committed during this CF to allow me to
>> focus on incremental maintenance for the rest of the release cycle.
>
>
> I must say this seems a bit pointless on its own. But if it's a stepping
> stone to incremental maintenance, I have no objections.

There are generally 4 kinds of mat view

1. Transactionally updated
2. Incremental update, eventually consistent
3. Incremental update, regular refresh
4. Full refresh

At the moment we only have type 4 and it holds a full lock while it
runs. We definitely need a CONCURRENTLY option and this is it.

Implementing the other types won't invalidate what we currently have,
so this makes sense to me.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2013-06-17 12:23:36 Re: Support for REINDEX CONCURRENTLY
Previous Message Kevin Grittner 2013-06-17 12:15:36 Re: refresh materialized view concurrently