pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: Christophe Pettus <xof@thebuild.com>
To: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [COMMITTERS] pgsql: Implement table partitioning.
Date: Sat, 10 Dec 2016 17:19:32 -0600
Message-ID: <c1390a27-065c-54fc-a1d9-bd446b1aecda@BlueTreble.com> (raw)
In-Reply-To: <F0C67105-ADFE-4A47-B461-DC5230D6BE43@thebuild.com>
References: <E1cEgoz-0001H4-UP@gemulon.postgresql.org>
	<CA+Tgmobc4UVf2ARTR4D=xHOTHhVtEWbLSPuZAJP6QHHBNZPYcw@mail.gmail.com>
	<CAG1_KcD3mP6FT11C4CFhaHs6jQUvzBSoYFycbWkJi1xRpLajig@mail.gmail.com>
	<CA+HiwqFHGeiVWJxC=M_11pfzYu0n-oMpwkbgUH9iY=+4pUB4QQ@mail.gmail.com>
	<CAG1_KcCfJhpPHg9QSnytshC-K-Hu=mj1i9Jb3_6YA4O2SOto7w@mail.gmail.com>
	<CAG1_KcC71BwZRmYrCRtdY2GnUF9J6a55BK46kqjyHwEbCTc6Pw@mail.gmail.com>
	<CA+TgmoYF-N+33U4vnCx55KR+GFvsQ88ELA6O=j+i1J_gBCpTfg@mail.gmail.com>
	<CAG1_KcAbzpS1fHk+a-qU4bOO=wtDiaKrEtzfcYSFG_601NOE1A@mail.gmail.com>
	<F0C67105-ADFE-4A47-B461-DC5230D6BE43@thebuild.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 12/10/16 1:02 PM, Christophe Pettus wrote:
>
>> On Dec 9, 2016, at 22:52, Keith Fiske <keith@omniti.com> wrote:
>> On Fri, Dec 9, 2016 at 10:01 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>>> One thing that's tricky/annoying about this is that if you have a
>>> DEFAULT partition and then add a partition, you have to scan the
>>> DEFAULT partition for data that should be moved to the new partition.
>>> That makes what would otherwise be a quick operation slow.  Still, I'm
>>> sure there's a market for that feature.
>>
>> I would find that perfectly acceptable as long as a caveat about the performance impact was included in the documentation.
>
> +1.  I don't think it's conceptually different from adding a column with a default, in that regard; you just have to know the impact.

FWIW, I can think of another option: always check the default partition 
for data, even if the data should only exist in a specific partition. If 
that proved to be too expensive in the normal case it could be optional.

Is it possible to manually (and incrementally) move data from the 
default partition to a table that will become the partition for that 
data and then do a fast cut-over once that's done? That would be akin to 
adding a field without a DEFAULT, adding the DEFAULT after that, and 
then slowly updating all the existing rows...
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)


-- 
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 (36+ messages)  latest in thread

Message-ID: <c1390a27-065c-54fc-a1d9-bd446b1aecda@BlueTreble.com>
Permalink:  ../c1390a27-065c-54fc-a1d9-bd446b1aecda@BlueTreble.com/
Also on:    postgresql.org/message-id/c1390a27-065c-54fc-a1d9-bd446b1aecda@BlueTreble.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: Jim.Nasby@BlueTreble.com, xof@thebuild.com, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Implement table partitioning.
  In-Reply-To: <c1390a27-065c-54fc-a1d9-bd446b1aecda@BlueTreble.com>
  References: <E1cEgoz-0001H4-UP@gemulon.postgresql.org> <CA+Tgmobc4UVf2ARTR4D=xHOTHhVtEWbLSPuZAJP6QHHBNZPYcw@mail.gmail.com> <CAG1_KcD3mP6FT11C4CFhaHs6jQUvzBSoYFycbWkJi1xRpLajig@mail.gmail.com> <CA+HiwqFHGeiVWJxC=M_11pfzYu0n-oMpwkbgUH9iY=+4pUB4QQ@mail.gmail.com> <CAG1_KcCfJhpPHg9QSnytshC-K-Hu=mj1i9Jb3_6YA4O2SOto7w@mail.gmail.com> <CAG1_KcC71BwZRmYrCRtdY2GnUF9J6a55BK46kqjyHwEbCTc6Pw@mail.gmail.com> <CA+TgmoYF-N+33U4vnCx55KR+GFvsQ88ELA6O=j+i1J_gBCpTfg@mail.gmail.com> <CAG1_KcAbzpS1fHk+a-qU4bOO=wtDiaKrEtzfcYSFG_601NOE1A@mail.gmail.com> <F0C67105-ADFE-4A47-B461-DC5230D6BE43@thebuild.com> <c1390a27-065c-54fc-a1d9-bd446b1aecda@BlueTreble.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