pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: pgsql-hackers@postgresql.org, Claudio Freire <klaussfreire@gmail.com>
Subject: Re: On partitioning
Date: Wed, 17 Dec 2014 10:42:09 +0900
Message-ID: <5490DF71.6060800@lab.ntt.co.jp> (raw )
In-Reply-To: <CAGTBQpZSEvcvr_CHu=kWhapqWNjXCH+zbFPY5ybcPjJt32MpCA@mail.gmail.com >
References: <CAA4eK1LcDLmOfw3Y4L9FeAn+pMcLg6OLSTK45G9SBQUvO4tZYQ@mail.gmail.com >
<CA+TgmoYqwOmL=ykspWmwfFivwA2T3gzyEo_94YZd3L3WpLau4g@mail.gmail.com >
<007b01d015c6$373c21e0$a5b465a0$@lab.ntt.co.jp >
<CA+TgmoY=aa2eGzTHn+cepnoz4Exj6bhrkNkghFxSxO84V_WroA@mail.gmail.com >
<CA+TgmobH--E+GkGHsprjN-e_4-YR4208pmE9zp90sEjBjDBDMg@mail.gmail.com >
<CAGTBQpaqEbSO+=s1xod1G6xfawc1RRnYEL3jGp870h7APnCgGg@mail.gmail.com >
<9766.1418422242@sss.pgh.pa.us >
<WM!5674e59aab89034f672b7668897d87b46824a54cca29a62ba08c1af0387796e192e949d0345717737e6887fc6cabf78c!@asav-3.01.com >
<548B6EE3.3020309@agliodbs.com >
<CAGTBQpby6DG1E1T+9wfGzMat46OWCxmQ5h-AEr6YzA=iYd5dbQ@mail.gmail.com >
<20141213020946.GG1768@alvh.no-ip.org >
<001601d0180c$a212f550$e638dff0$@lab.ntt.co.jp >
<CA+TgmoaA18DL8SG51tDQ=wjQBAqb658cR1TSV3diLmk_x9iRzQ@mail.gmail.com >
<00cb01d018c2$9eb97260$dc2c5720$@lab.ntt.co.jp >
<CA+TgmoYjrM916OrZYdrwpzjhRDAGJrHrOLT5JnzMEyff+-=ZjA@mail.gmail.com >
<CAGTBQpZSEvcvr_CHu=kWhapqWNjXCH+zbFPY5ybcPjJt32MpCA@mail.gma! il.com >
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 17-12-2014 AM 12:28, Claudio Freire wrote:
> On Tue, Dec 16, 2014 at 12:15 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>> I'm not really sure what you are getting here. An "otherwise-good
>> expression" basically means a constant. Index expressions have to be
>> things that always produce the same result given the same input,
>> because otherwise you might get a different result when searching the
>> index than you did when building it, and then you would fail to find
>> keys that are actually present.
>
> I think the point is partitioning based on the result of an expression
> over row columns.
Actually, in this case, I was thinking about a partition definition not
partition key definition. That is, using an expression as partition
value which has problems that I see.
> Or if it's not, it should be made anyway:
>
> PARTITION BY LIST (extract(month from date_created) VALUES (1, 3, 6, 9, 12);
>
> Or something like that.
>
Such a thing seems very desirable though there are some tradeoffs
compared to having partitioning key be just attrnums. Or at least we can
start with that.
An arbitrary expression as partitioning key means that we have to
recompute such an expression for each input row. Think how inefficient
that may be when bulk-loading into a partitioned table during, say, a
COPY. Though there may be ways to fix that.
Thanks,
Amit
--
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: <5490DF71.6060800@lab.ntt.co.jp>
Permalink: ../5490DF71.6060800@lab.ntt.co.jp/
Also on: postgresql.org/message-id/5490DF71.6060800@lab.ntt.co.jp
copy link · copy postgr.es
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: Langote_Amit_f8@lab.ntt.co.jp, klaussfreire@gmail.com
Subject: Re: On partitioning
In-Reply-To: <5490DF71.6060800@lab.ntt.co.jp>
* 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