Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XOgBR-00061X-GP for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Sep 2014 04:59:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XOgBQ-0002jI-Ru for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Sep 2014 04:59:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XOgBP-0002j4-NW for pgsql-hackers@postgresql.org; Tue, 02 Sep 2014 04:59:07 +0000 Received: from mout.kundenserver.de ([212.227.126.187]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XOgBL-0004qB-9O for pgsql-hackers@postgresql.org; Tue, 02 Sep 2014 04:59:06 +0000 Received: from ayaki.localdomain (106-68-143-100.dyn.iinet.net.au [106.68.143.100]) by mrelayeu.kundenserver.de (node=mreue004) with ESMTP (Nemesis) id 0LxKk2-1YVXBo3bEQ-016t9c; Tue, 02 Sep 2014 06:59:00 +0200 Message-ID: <54054E8F.50702@2ndquadrant.com> Date: Tue, 02 Sep 2014 12:58:55 +0800 From: Craig Ringer Organization: 2nd Quadrant User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: Tom Lane , Alvaro Herrera CC: Pg Hackers Subject: Re: On partitioning References: <20140829155607.GF7705@eldon.alvh.no-ip.org> <16957.1409515410@sss.pgh.pa.us> In-Reply-To: <16957.1409515410@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:0vdazf2eeN2tKwTzTCb+x7qRBUPO9/pmGlFrq/BRkeQ 37A6qwoAeLVTLBlgDi+a1AmiTN8t/G5OKSrz+nGNTHMekUMUFi UQz2AP9tK3B0p5xv/AswyqUfzxWSq2SH3a92ob7Pf9Xvs0Gt3p CfwPL2vY5/Fyb8gaEOKzdT5RYKtVha9C+dE+8hq+FTKLII/OXl GGJ6qlBI7pz7anMRhHRw2fFZ7Wr19nDAj+y6En1bj6J+VTrbmn PkrXsZVPjD75wkFPJftbwZBhgP0L/6C76YIZDhk2eVkohzqLBA 9TZ6qe9dAaVJekyH7+gb5ces7TaW0qaIFRFsETMeBBlU2MH27c ZCJIltRlV/S1Nt1af8+PaBp0uLS77GPoed3ydGO5J X-UI-Out-Filterresults: notjunk:1; X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 09/01/2014 04:03 AM, Tom Lane wrote: > I think one of the key design decisions we have to make is whether > partitions are all constrained to have exactly the same set of indexes. ... and a lot of that comes down to what use cases the partitioning is meant to handle, and what people are expected to continue to DIY with inheritance. Simple range and hash partitioning are the main things being discussed. Other moderately common partitioning uses seem to be hot/cold partitioning, usually on unequal ranges, and closely related live/dead partitioning for apps that soft-delete data. In both those you may well want to suppress indexes on the cold/dead portion, much like we currently have partial indexes. In fact, how different is an index that's present on only a subset of partitions to a partial index, in planning terms? We know the partitions it is/isn't on, after all, and can form an expression that finds just those partitions. (I guess the answer there is that partial index planning is probably not smart enough to be useful for this). > If we don't insist on that it will greatly complicate planning compared > to what we'll get if we do insist on it, because then the planner will > need to generate a separate customized plan subtree for each partition. Seems to be like a "make room to support it in future, but don't do it now" thing. Partitioning schemes like: [prior years] [last year] [this year] [this month] [this week] could benefit from it, but they also need things like online repartitioning, updates to move tuples across partitions, etc. So it's all in the "let's not lock it out for the future, but lets not tackle it now either" box. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers