From: Greg Stark <gsstark@mit.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Greg Stark <gsstark@mit.edu>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: What needs to be done for real Partitioning?
Date: 20 Mar 2005 17:18:35 -0500
Message-ID: <87oedeezb8.fsf@stark.xeocode.com> (raw)
In-Reply-To: <8164.1111341510@sss.pgh.pa.us>
References: <200503191202.38089.josh@agliodbs.com>
<87br9ehmja.fsf@stark.xeocode.com>
<8164.1111341510@sss.pgh.pa.us>
Tom Lane <tgl@sss.pgh.pa.us> writes:
> > A command to remove a partition from the partitioned table and turn it into
> > a regular table.
>
> Ugh. Why? You can access the table directly anyway.
>
> > A command to take a regular table and turn it into a partition.
>
> Double ugh. Verifying that the table matches the partition scheme seems
> like a lot of ugly, bug-prone, unnecessary code. What's the use case
> for this anyway?
>
> Those last two are *certainly* not Phase I requirements, and I don't
> think we need them at all ever.
These are effectively equivalent to "ALTER TABLE RENAME". Without these
commands you would be in pretty much the same position as a DBA without the
ability to rename tables.
The heart of partitioned tables is being able to load and unload entire
partitions quickly. You have to have somewhere to "unload" them too. Most
people aren't happy just watching their data disappear entirely. They want to
move them other tables or even other databases.
Similarly, they have to have somewhere to load them from. They're usually not
happy loading data directly into their production data warehouse tables
without manipulating the data, or doing things like clustering or indexing.
You could argue for some sort of setup where you could take a partition
"offline" during which you could safely do things like export or manipulate
the data. But that's awfully limiting. What if I want to do things like add
columns, or change data types, or any other manipulation that breaks the
symmetry with the production partitioned table.
I don't think it's really hard at all to check that the table matches the
partition scheme. You can just require that there be an existing table
constraint in place that matches the partitioning scheme. I think you can even
be fascist about the exact syntax of the constraint fitting precisely a
specified format.
--
greg
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-performance@postgresql.org
Cc: gsstark@mit.edu, tgl@sss.pgh.pa.us, josh@agliodbs.com
Subject: Re: What needs to be done for real Partitioning?
In-Reply-To: <87oedeezb8.fsf@stark.xeocode.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