public inbox for [email protected]  
help / color / mirror / Atom feed
From: Claudio Freire <[email protected]>
To: Shaun Thomas <[email protected]>
Cc: Rick Otten <[email protected]>
Cc: pgsql-performa. <[email protected]>
Subject: Re: partitioning materialized views
Date: Wed, 19 Jul 2017 22:23:28 -0300
Message-ID: <CAGTBQpZbLouBR2zbTkW9oU+mXw=R8ZcVH-1h3U+b+962iyd2Lg@mail.gmail.com> (raw)
In-Reply-To: <CAG1YDPdOvL3cm_1TLEi9ZUsetw0eSPKh57WqfU6-+k2sucuMSw@mail.gmail.com>
References: <CAMAYy4LD9TDO6ohfZwZ7OWOfu3oUZKQxi1Y=qt=36C65DL4jOw@mail.gmail.com>
	<CAG1YDPeH+FBFv9_w1ktPn3JyJNA1F8L_6qaMcRZZQsbBjXtxww@mail.gmail.com>
	<CAMAYy4L=-n=VzyMi6s6tg0PSJcR6mXH2D2K1vk526uLEZkC31A@mail.gmail.com>
	<CAMAYy4L9msh+hzPwYPVypVrxDPa4U2A0AV_HmwBzO7rY_ThOhA@mail.gmail.com>
	<CAG1YDPdOvL3cm_1TLEi9ZUsetw0eSPKh57WqfU6-+k2sucuMSw@mail.gmail.com>
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgsql-performance>

On Fri, Jul 7, 2017 at 10:12 AM, Shaun Thomas
<[email protected]> 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.


-- 
Sent via pgsql-performance mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance




reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: partitioning materialized views
  In-Reply-To: <CAGTBQpZbLouBR2zbTkW9oU+mXw=R8ZcVH-1h3U+b+962iyd2Lg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox