Re: On partitioning - Mailing list pgsql-hackers

From José Luis Tallón
Subject Re: On partitioning
Date
Msg-id 548C7012.7040608@adv-solutions.net
Whole thread Raw
In response to Re: On partitioning  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: On partitioning  (José Luis Tallón<jltallon@adv-solutions.net>)
Re: On partitioning  (Amit Langote <amitlangote09@gmail.com>)
List pgsql-hackers
On 12/13/2014 03:09 AM, Alvaro Herrera wrote:
> [snip]
> Arbitrary SQL expressions (including functions) are not the thing to use
> for partitioning -- at least that's how I understand this whole
> discussion.  I don't think you want to do "proofs" as such -- they are
> expensive.

Yup. Plus, it looks like (from reading Oracle's documentation) they end 
up converting the LESS THAN clauses into range lists internally.
Anyone that can attest to this? (or just disprove it, if I'm wrong)

I just suggested using the existing RangeType infrastructure for this ( 
<<, >> and && operators, specifically, might do the trick) before 
reading your mail citing BRIN.    ... which might as well allow some interesting runtime 
optimizations when range partitioning is used and *a huge* number of 
partitions get defined --- I'm specifically thinking about massive OLTP 
with very deep (say, 5 years' worth) archival partitioning where it 
would be inconvenient to have the tuple routing information always in 
memory.
I'm specifically suggesting some ( range_value -> partitionOID) mapping 
using a BRIN index for this --- it could be auto-created just like we do 
for primary keys.

Just my 2c


Thanks,
    / J.L.




pgsql-hackers by date:

Previous
From: José Luis Tallón
Date:
Subject: Re: On partitioning
Next
From: David Fetter
Date:
Subject: Re: moving Orafce from pgFoundry - pgFoundry management