Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dTT5v-0000cu-6z for pgsql-performance@arkaria.postgresql.org; Fri, 07 Jul 2017 13:14:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dTT5u-0005Lq-Ku for pgsql-performance@arkaria.postgresql.org; Fri, 07 Jul 2017 13:14:50 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dTT4B-0002Gu-Mk for pgsql-performance@postgresql.org; Fri, 07 Jul 2017 13:13:03 +0000 Received: from mail-it0-x235.google.com ([2607:f8b0:4001:c0b::235]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dTT48-0000IS-U5 for pgsql-performance@postgresql.org; Fri, 07 Jul 2017 13:13:02 +0000 Received: by mail-it0-x235.google.com with SMTP id k192so35063874ith.1 for ; Fri, 07 Jul 2017 06:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ruzDsQ4prpD9CARvl2l4/Afjz7tnRHdc1nCJc4XNhDo=; b=staNyW6DHNNzipHju5WfOvGhWHzTu0msA0p67Own2MnNRiEuYj2cSPd37q2liQP8p8 JLuYGbOcYnBzlJqMMg8crISOgffa8uilPE33kG4U4N6RxzSOg43f28RtBuUbynNyeIGm qB11FdXPQ4eQTkUgkraNbV2dduvxYaGABsdr0rZUUo+JDkJdEuY+OS60HSm46jCYe53k 7kYZX7tOx85GYwMvtPrt2NawxGe8SJQgHLME/0bOrbzuxN8lpggQBi/R7hdz2EswmEq1 rCQiGJKdoZDrfhW2aCtowLXNhBaMDpmj627OClTuGzB+1h3sZdZpKeC5bXHBA4ynL3Eg 2sYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ruzDsQ4prpD9CARvl2l4/Afjz7tnRHdc1nCJc4XNhDo=; b=DH2oQF23VGiC55/bU3AjKi2atLlQJhO5HFMRvsFuVka/IjFzCyBz2rw0ZZ3LJRvIos qC8wx1bVKyvrsT0xa/B2NuwkloELJM7LzVTAJq1ls0o5tl3kfwsOejSq+1e7KotuWzRt SmIQoXN2DMf3GsIouVkJbU96f8ztOSmSvizKUMTfheFaTdJPD1hLKz6eKI72YYfNyOou l5XRtNhg+cuYbwe5HuyhgPR5qIRCeEKOF4nGgGMtFZvWOr4zJRjMAohxBccnmMJL7NrV Co9q23Zxf5LlyZNtaE31SclHamajfeQ4kg5ffsiaegtFOPuM1v23fscS5aTcDgy0rK+X OKnQ== X-Gm-Message-State: AKS2vOzllG+AmjAYNzTLRyMiRCiS0qxoNiMZHMcGxkCpK2S7ca1URugT SgcREi1W9dVWoqmi9JK2GO/xN13Ap8VG X-Received: by 10.107.157.9 with SMTP id g9mr49318170ioe.46.1499433179282; Fri, 07 Jul 2017 06:12:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.24.133 with HTTP; Fri, 7 Jul 2017 06:12:58 -0700 (PDT) In-Reply-To: References: From: Shaun Thomas Date: Fri, 7 Jul 2017 08:12:58 -0500 Message-ID: Subject: Re: partitioning materialized views To: Rick Otten Cc: "pgsql-performa." Content-Type: text/plain; charset="UTF-8" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org > 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. -- Shaun M Thomas - 2ndQuadrant PostgreSQL Training, Services and Support shaun.thomas@2ndquadrant.com | www.2ndQuadrant.com -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance