Re: refresh materialized view concurrently

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>
Cc: Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: refresh materialized view concurrently
Date: 2013-06-17 16:21:41
Message-ID: CA+TgmoY_r784yXm3YYJ1LvtL=H4s_W8zovaAHVR0_43q3SbNpA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 17, 2013 at 11:21 AM, Kevin Grittner <kgrittn(at)ymail(dot)com> wrote:
> Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com> wrote:
>> 2013/6/17 Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>:
>
>>
>>> + errmsg("concurrent refresh requires a
>>> unique index on just columns for all rows of the materialized view")));
>>
>> Maybe my english is failing me here, but I don’t understand the “just” part.
>
> It means that the index must not use any expressions in the list of
> what it's indexing on -- only column names. Suggestions for better
> wording would be welcome.

Random idea:

ERROR: materialized view \"%s\" does not have a unique key

Perhaps augmented with:

HINT: Create a UNIQUE btree index with no WHERE clause on one or more
columns of the materialized view.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2013-06-17 16:36:42 Re: [PATCH] Remove useless USE_PGXS support in contrib
Previous Message Robert Haas 2013-06-17 15:31:22 Re: Request for Patch Feedback: Lag & Lead Window Functions Can Ignore Nulls