Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XyPIh-0003oM-28 for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Dec 2014 18:14:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XyPIf-0004OG-Ix for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Dec 2014 18:14:17 +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 1XyPIe-0004O9-C6 for pgsql-hackers@postgresql.org; Tue, 09 Dec 2014 18:14:16 +0000 Received: from 01.zmailcloud.com ([192.198.85.104] helo=mx-out-1.zmailcloud.com) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XyPIY-0005rR-1V for pgsql-hackers@postgresql.org; Tue, 09 Dec 2014 18:14:13 +0000 Received: from smtp.01.com (smtp.01.com [10.10.0.43]) by mx-out-1.zmailcloud.com (Postfix) with ESMTP id 48F455660BC; Tue, 9 Dec 2014 12:14:08 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 2C3B76054C; Tue, 9 Dec 2014 12:14:08 -0600 (CST) X-Virus-Scanned: amavisd-new at smtp-out-2.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-2.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aKIODnHjWNNp; Tue, 9 Dec 2014 12:14:08 -0600 (CST) Received: from smtp.01.com (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id ED57C60553; Tue, 9 Dec 2014 12:14:07 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id CF43D60551; Tue, 9 Dec 2014 12:14:07 -0600 (CST) X-Virus-Scanned: amavisd-new at smtp-out-2.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-2.01.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id GRmV4_O7MFJH; Tue, 9 Dec 2014 12:14:07 -0600 (CST) Received: from [192.168.47.106] (50-0-164-241.dsl.dynamic.fusionbroadband.com [50.0.164.241]) by smtp-out-2.01.com (Postfix) with ESMTPSA id 0EA176054C; Tue, 9 Dec 2014 12:14:05 -0600 (CST) Message-ID: <54873BE9.2090802@agliodbs.com> Date: Tue, 09 Dec 2014 10:14:01 -0800 From: Josh Berkus Organization: PostgreSQL Experts Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Amit Langote , 'Amit Kapila' CC: 'Robert Haas' , 'Andres Freund' , 'Alvaro Herrera' , 'Bruce Momjian' , 'Pg Hackers' Subject: Re: On partitioning References: <20140829155607.GF7705@eldon.alvh.no-ip.org> <053501cffa30$ecdf8700$c69e9500$@lab.ntt.co.jp> <066501cffd52$3d919390$b8b4bab0$@lab.ntt.co.jp> <032601d00471$ea6f4280$bf4dc780$@lab.ntt.co.jp> <04da01d00917$2dde1010$899a3030$@lab.ntt.co.jp> <015b01d00eab$56d37700$047a6500$@lab.ntt.co.jp> <002d01d01359$290cb4a0$7b261de0$@lab.ntt.co.jp> <005601d01388$9bc8ea20$d35abe60$@lab.ntt.co.jp> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) 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 12/09/2014 12:17 AM, Amit Langote wrote: >> Now if user wants to define multi-column Partition based on >> > monthly_salary and annual_salary, how do we want him to >> > specify the values. Basically how to distinguish which values >> > belong to first column key and which one's belong to second >> > column key. >> > > Perhaps you are talking about "syntactic" difficulties that I totally missed in my other reply to this mail? > > Can we represent the same data by rather using a subpartitioning scheme? ISTM, semantics would remain the same. > > ... PARTITION BY (monthly_salary) SUBPARTITION BY (annual_salary)? ... or just use arrays. PARTITION BY LIST ( monthly_salary, annual_salary ) PARTITION salary_small VALUES ({[300,400],[5000,6000]}) ) .... ... but that begs the question of how partition by list over two columns (or more) would even work? You'd need an a*b number of partitions, and the user would be pretty much certain to miss a few value combinations. Maybe we should just restrict list partitioning to a single column for a first release, and wait and see if people ask for more? -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers