Existence check for suitable index in advance when concurrently refreshing.

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Existence check for suitable index in advance when concurrently refreshing.
Date: 2016-01-26 12:33:24
Message-ID: CAD21AoARR88b+U3JUBJw6auJR3XqcgL5Pj5QfFvBo00FJ-4J-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

In concurrently refreshing materialized view, we check whether that
materialized view has suitable index(unique and not having WHERE
condition), after filling data to new snapshot
(refresh_matview_datafill()).
This logic leads to taking a lot of time until postgres returns ERROR
log if that table doesn't has suitable index and table is large. it
wastes time.
I think we should check whether that materialized view can use
concurrently refreshing or not in advance.
The patch is attached.

Please give me feedbacks.

--
Regards,

--
Masahiko Sawada

Attachment Content-Type Size
matview_concurrently_refresh_check_index_v1.patch binary/octet-stream 2.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stas Kelvich 2016-01-26 12:43:42 Re: Speedup twophase transactions
Previous Message leo 2016-01-26 12:33:13 Re: pglogical - logical replication contrib module