Re: [HACKERS] Adding support for Default partition in partitioning - Mailing list pgsql-hackers

From Amit Langote
Subject Re: [HACKERS] Adding support for Default partition in partitioning
Date
Msg-id 9ad4a1ae-e71b-4e6e-7b8c-e4ba1b8b9c8e@lab.ntt.co.jp
Whole thread Raw
In response to Re: [HACKERS] Adding support for Default partition in partitioning  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] Adding support for Default partition in partitioning
List pgsql-hackers
On 2017/06/15 4:51, Robert Haas wrote:
> On Wed, Jun 14, 2017 at 8:02 AM, Jeevan Ladhe
> <jeevan.ladhe@enterprisedb.com> wrote:
>> Here are the details of the patches in attached zip.
>> 0001. refactoring existing ATExecAttachPartition  code so that it can be
>> used for
>> default partitioning as well
>> 0002. support for default partition with the restriction of preventing
>> addition
>> of any new partition after default partition.
>> 0003. extend default partitioning support to allow addition of new
>> partitions.
>> 0004. extend default partitioning validation code to reuse the refactored
>> code
>> in patch 0001.
> 
> I think the core ideas of this patch are pretty solid now.  It's come
> a long way in the last month.

+1


BTW, I noticed the following in 0002:

@@ -1322,15 +1357,59 @@ get_qual_for_list(PartitionKey key,
PartitionBoundSpec *spec)

[ ... ]

+        oldcxt = MemoryContextSwitchTo(CacheMemoryContext);

I'm not sure if we need to do that.  Can you explain?

Thanks,
Amit




pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: [HACKERS] Refreshing subscription relation state inside atransaction block
Next
From: Amit Langote
Date:
Subject: Re: [HACKERS] Adding support for Default partition in partitioning