Re: Partitioning: issues/ideas (Was: Re: On partitioning) - Mailing list pgsql-hackers

From Amit Langote
Subject Re: Partitioning: issues/ideas (Was: Re: On partitioning)
Date
Msg-id 54BC8387.1000808@lab.ntt.co.jp
Whole thread Raw
In response to Re: Partitioning: issues/ideas (Was: Re: On partitioning)  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
List pgsql-hackers
On 19-01-2015 PM 12:37, Ashutosh Bapat wrote:
> On Fri, Jan 16, 2015 at 11:04 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> 
>> On Wed, Jan 14, 2015 at 9:07 PM, Amit Langote
>> <Langote_Amit_f8@lab.ntt.co.jp> wrote:
>>
>>> I wonder if we could add a clause like DISTRIBUTED BY to complement
>>> PARTITION ON that represents a hash distributed/partitioned table (that
>>> could be a syntax to support sharded tables maybe; we would definitely
>>> want to move ahead in that direction I guess)
>>
>> Maybe eventually, but let's not complicate things by worrying too much
>> about that now.
>>
> 
> Instead we might want to specify which server (foreign or local) each of
> the partition go to, something like LOCATED ON clause for each of the
> partitions with default as local server.
> 

Given how things stand today, we do not allow DDL with the FDW
interface, unless I'm missing something. So, we are restricted to only
going the other way around, say,

CREATE FOREIGN TABLE partXX PARTITION OF parent SERVER ...;

assuming we like the proposed syntax -

CREATE TABLE child PARTITION OF parent;

I think this is also assuming we are relying on foreign table
inheritance. That is, both that partitioning is based on inheritance and
foreign tables support inheritance (which should be the case soon)

Still, I think Robert may be correct in that it would not be sooner that
we integrate foreign tables with partitioning scheme (I guess mostly the
syntax aspect of it).

Thanks,
Amit




pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Reducing buildfarm disk usage: remove temp installs when done
Next
From: Michael Paquier
Date:
Subject: Re: install libpq.dll in bin directory on Windows / Cygwin