pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: On partitioning
Date: Tue, 09 Dec 2014 10:14:01 -0800
Message-ID: <54873BE9.2090802@agliodbs.com> (raw)
In-Reply-To: <WM!60d8b23ad9666552f3095538d3eec48d382035d0ff9d1112ffeb58917794fb27dd5c7f6932d10f06cdc4446e68a00e50!@asav-3.01.com>
References: <20140829155607.GF7705@eldon.alvh.no-ip.org>
	<053501cffa30$ecdf8700$c69e9500$@lab.ntt.co.jp>
	<CA+TgmobN+DT_=hj3NkXZgSv157-W24YaZ50oFdRbhS493covzg@mail.gmail.com>
	<066501cffd52$3d919390$b8b4bab0$@lab.ntt.co.jp>
	<CA+TgmoZqndQQQY1U0OBxUOJy1RE_MAawJErghNB7RM8MPgCYDg@mail.gmail.com>
	<032601d00471$ea6f4280$bf4dc780$@lab.ntt.co.jp>
	<CA+TgmoZ-HJOTPfZcnPOh27881xn4N1QGtY7J4nG+v6tV9cJjNw@mail.gmail.com>
	<04da01d00917$2dde1010$899a3030$@lab.ntt.co.jp>
	<CA+TgmoaU+0EN-XsAT1O+64xrENNJiKPgem+Q1hWzz7a=1MYrDA@mail.gmail.com>
	<015b01d00eab$56d37700$047a6500$@lab.ntt.co.jp>
	<C! AA4eK1KoJyoV0qOd0a8rEj+	iTiAb1ki0pVz5S8Zoi98pCKrDhg@mail.gmail.com>
	<CA+TgmoYk9aU44Z5YRWoV2V9raj=HMbJBfORYr9GzF4vShsGvDA@mail.gmail.com>
	<002d01d01359$290cb4a0$7b261de0$@lab.ntt.co.jp>
	<CAA4eK1L53knKrrhXDTi-no53F2mF+X2a2gKXDpQ1DNi1+NMuVQ@mail.gmail.com>
	<005601d01388$9bc8ea20$d35abe60$@lab.ntt.co.jp>
	<WM!60d8b23ad9666552f3095538d3eec48d382035d0ff9d1112ffeb58917794fb27dd5c7f6932d10f06cdc4446e68a00e50!@asav-3.01 .com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

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



view thread (169+ messages)  latest in thread

Message-ID: <54873BE9.2090802@agliodbs.com>
Permalink:  ../54873BE9.2090802@agliodbs.com/
Also on:    postgresql.org/message-id/54873BE9.2090802@agliodbs.com

 · 

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: pgsql-hackers@postgresql.org
  Cc: josh@agliodbs.com, Langote_Amit_f8@lab.ntt.co.jp, amit.kapila16@gmail.com, robertmhaas@gmail.com, andres@2ndquadrant.com, alvherre@2ndquadrant.com, bruce@momjian.us
  Subject: Re: On partitioning
  In-Reply-To: <54873BE9.2090802@agliodbs.com>

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

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