Re: partitioning materialized views

From: Claudio Freire <klaussfreire(at)gmail(dot)com>
To: Shaun Thomas <shaun(dot)thomas(at)2ndquadrant(dot)com>
Cc: Rick Otten <rottenwindfish(at)gmail(dot)com>, "pgsql-performa(dot)" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: partitioning materialized views
Date: 2017-07-20 01:23:28
Message-ID: CAGTBQpZbLouBR2zbTkW9oU+mXw=R8ZcVH-1h3U+b+962iyd2Lg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, Jul 7, 2017 at 10:12 AM, Shaun Thomas
<shaun(dot)thomas(at)2ndquadrant(dot)com> wrote:
>> I don't think the downstream dependencies will let that work without
>> rebuilding them as well. The drop fails (without a cascade), and the other
>> views and matviews that are built off of this all simply point to x_old.
>
> Wow, ouch. Yeah, I'd neglected to consider dependent objects. Your
> only "out" at this point is to either add or utilize a "modified_date"
> column of some kind, so you can maintain a different MV with some
> recent window of data, and regularly merge that into a physical local
> copy (not an MV) sort of like a running ETL. Though that won't help
> with deletes, unfortunately.

You have another out: rebuild the dependent views before the drop.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Daulat Ram 2017-07-20 09:05:13 CREATE EXTENSION postgis;
Previous Message vinny 2017-07-19 13:43:55 Re: How to grant only create schemas and create database objects permission to user.