Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dY0DU-0007QK-0M for pgsql-performance@arkaria.postgresql.org; Thu, 20 Jul 2017 01:25:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dY0DT-0001fL-A4 for pgsql-performance@arkaria.postgresql.org; Thu, 20 Jul 2017 01:25:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dY0Bj-0006mL-Kf for pgsql-performance@postgresql.org; Thu, 20 Jul 2017 01:23:35 +0000 Received: from mail-it0-x22e.google.com ([2607:f8b0:4001:c0b::22e]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dY0Bg-0001nQ-8a for pgsql-performance@postgresql.org; Thu, 20 Jul 2017 01:23:34 +0000 Received: by mail-it0-x22e.google.com with SMTP id v205so2444020itf.1 for ; Wed, 19 Jul 2017 18:23:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=QQy0fPO7HNMewQPlEPV4+UpoC5ElKgNlHHA1GKbR0Xk=; b=PMm+wY7VaOC096EQFdFXoyH9Hu+xtPvQW9eT6pFFqnbdVcegtPhe1qDBHNt48MARf9 Y21LQ54ljcpTFdXrNgN55iE3UNavTlq2A/kPYBnDwxVawQbNeqpYZdNBUWmVE+xuMjxv DGAkxE+7wke8bM73EA2l9FYoxj8geJ/5FDB0kYqeQTKoyJwLhL0TlcTdUtqN1IuZy5IR 9QphbN3kq8OHzEQgtfF3tfMQxda9tOd9284+HjQ9w88b5DuLV4kJ/TGXU/Z5nFXIyqWN i68sHNcff5yscuUDdkfy7FQH4QNA3DeSq5iDVU7elu5Bp1nTBTiO7hCZD80GAUNa0Iwv sRnA== 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=QQy0fPO7HNMewQPlEPV4+UpoC5ElKgNlHHA1GKbR0Xk=; b=Wpfxv6b3pftBZXUiYLhPfroGJmwPX6w9/MrEC+jHTzNFDJIl7lKP/F2HiYmofJPJYT 4ZA5GwlQvNbl/BOmcF/IsI3ZireLrrAvgI/BWRd0znDOOjICuTXMsjMYQG/IfTarOW8i G0wWhZcc9iwGSZ+fHuCtTAJ5n9PIOuF8JH1D3qqMPTdLgvgLhLPlxFSUq4qh5mnR1KMU nIoBaxx6HBkIuSBCO0CqIp812djoJ+P4mRbveGvYnS9jNBQG9j8ByA5tvcOCKbbcDyMi a614t20h7XTvMYOsvypQq6IFyRhouPfVQIXr0i74NaddBh8YrKKzQwZtLOeShTGd6j5n mx+Q== X-Gm-Message-State: AIVw112+jWan81Eo6B0TDFiljdmyd0hd1WlxH+vAy4aFvyBvFpc7Jnjl Yo3B7EJgZXQR9hcnSp1ptwKHK95ghA== X-Received: by 10.36.79.212 with SMTP id c203mr1878282itb.49.1500513809797; Wed, 19 Jul 2017 18:23:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.40.136 with HTTP; Wed, 19 Jul 2017 18:23:28 -0700 (PDT) In-Reply-To: References: From: Claudio Freire Date: Wed, 19 Jul 2017 22:23:28 -0300 Message-ID: Subject: Re: partitioning materialized views To: Shaun Thomas Cc: Rick Otten , "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 On Fri, Jul 7, 2017 at 10:12 AM, Shaun Thomas 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 (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance