Re: refresh materialized view concurrently

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Kevin Grittner <kgrittn(at)ymail(dot)com>, Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: refresh materialized view concurrently
Date: 2013-07-03 15:08:32
Message-ID: 24377.1372864112@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Wed, Jul 3, 2013 at 10:47 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Are we somehow not going through ExecOpenIndices?

> I dunno. I just did a quick black-box test:

> CREATE TABLE foo (a int primary key);
> BEGIN;
> INSERT INTO foo VALUES (1);
> SELECT relation::regclass, locktype, mode, granted FROM pg_locks;

> I get:

> relation | locktype | mode | granted
> ----------+---------------+------------------+---------
> pg_locks | relation | AccessShareLock | t
> foo | relation | RowExclusiveLock | t
> | virtualxid | ExclusiveLock | t
> | transactionid | ExclusiveLock | t

> No foo_pkey anywhere.

That proves nothing, as we don't keep such locks after the query
(and there's no reason to AFAICS). See ExecCloseIndices.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ian Lawrence Barwick 2013-07-03 15:12:11 (trivial patch) remove superfluous semicolons from pg_dump
Previous Message Robert Haas 2013-07-03 15:08:01 Re: Add more regression tests for ASYNC