Re: [HACKERS] expanding inheritance in partition bound order

2017-09-14 Thread Amit Langote
On 2017/09/15 1:37, Robert Haas wrote: > On Thu, Sep 14, 2017 at 7:56 AM, Amit Khandekar > wrote: >> On 14 September 2017 at 06:43, Amit Langote >>> langote_amit...@lab.ntt.co.jp> wrote: >>> Attached updated patch. >> >> @@ -1222,151 +1209,130 @@ PartitionDispatch * >>

Re: [HACKERS] expanding inheritance in partition bound order

2017-09-14 Thread Robert Haas
On Thu, Sep 14, 2017 at 7:56 AM, Amit Khandekar wrote: > On 14 September 2017 at 06:43, Amit Langote >> langote_amit...@lab.ntt.co.jp> wrote: >> Attached updated patch. > > @@ -1222,151 +1209,130 @@ PartitionDispatch * > RelationGetPartitionDispatchInfo(Relation rel, >

Re: [HACKERS] expanding inheritance in partition bound order

2017-09-14 Thread Amit Khandekar
On 14 September 2017 at 06:43, Amit Langote > langote_amit...@lab.ntt.co.jp> wrote: > Attached updated patch. @@ -1222,151 +1209,130 @@ PartitionDispatch * RelationGetPartitionDispatchInfo(Relation rel, int *num_parted, List

Re: [HACKERS] expanding inheritance in partition bound order

2017-09-13 Thread Amit Langote
On 2017/09/14 1:42, Robert Haas wrote: > On Wed, Sep 13, 2017 at 6:02 AM, Amit Langote > wrote: >> It seems to me we don't really need the first patch all that much. That >> is, let's keep PartitionDispatchData the way it is for now, since we don't >> really have

Re: [HACKERS] expanding inheritance in partition bound order

2017-09-13 Thread Robert Haas
On Wed, Sep 13, 2017 at 6:02 AM, Amit Langote wrote: > It seems to me we don't really need the first patch all that much. That > is, let's keep PartitionDispatchData the way it is for now, since we don't > really have any need for it beside tuple-routing (EIBO as

Re: [HACKERS] expanding inheritance in partition bound order

2017-09-13 Thread Amit Khandekar
On 13 September 2017 at 15:32, Amit Langote wrote: > On 2017/09/11 18:56, Amit Langote wrote: >> Attached updated patch does it that way for both partitioned table indexes >> and leaf partition indexes. Thanks for pointing it out. > > It seems to me we don't really

Re: [HACKERS] expanding inheritance in partition bound order

2017-09-13 Thread Amit Langote
On 2017/09/11 18:56, Amit Langote wrote: > Attached updated patch does it that way for both partitioned table indexes > and leaf partition indexes. Thanks for pointing it out. It seems to me we don't really need the first patch all that much. That is, let's keep PartitionDispatchData the way it

Re: [HACKERS] expanding inheritance in partition bound order

2017-09-11 Thread Amit Langote
Hi Amit, On 2017/09/11 16:16, Amit Khandekar wrote: > Thanks Amit for the patch. I am still reviewing it, but meanwhile > below are a few comments so far ... Thanks for the review. > + next_parted_idx += (list_length(*pds) - next_parted_idx - 1); > > I think this can be replaced just by : >

Re: [HACKERS] expanding inheritance in partition bound order

2017-09-11 Thread Amit Khandekar
Thanks Amit for the patch. I am still reviewing it, but meanwhile below are a few comments so far ... On 8 September 2017 at 15:53, Amit Langote wrote: > [PATCH 2/2] Make RelationGetPartitionDispatch expansion order > depth-first > > This is so as it matches what

Re: [HACKERS] expanding inheritance in partition bound order

2017-09-08 Thread Amit Langote
On 2017/09/05 14:11, Amit Khandekar wrote: > Great, thanks. Just wanted to make sure someone is working on that, > because, as you said, it is no longer an EIBO patch. Since you are > doing that, I won't work on that. Here is that patch (actually two patches). Sorry it took me a bit.

Re: [HACKERS] expanding inheritance in partition bound order

2017-09-04 Thread Amit Khandekar
On 4 September 2017 at 06:34, Amit Langote wrote: > Hi Amit, > > On 2017/09/03 16:07, Amit Khandekar wrote: >> On 31 August 2017 at 13:06, Amit Langote >> wrote: Mind you, that idea has some problems anyway in the face of

Re: [HACKERS] expanding inheritance in partition bound order

2017-09-03 Thread Amit Langote
Hi Amit, On 2017/09/03 16:07, Amit Khandekar wrote: > On 31 August 2017 at 13:06, Amit Langote > wrote: >>> Mind you, that idea has some problems anyway in the face of default >>> partitions, null partitions, and list partitions which accept >>> non-contiguous

Re: [HACKERS] expanding inheritance in partition bound order

2017-09-03 Thread Amit Khandekar
On 31 August 2017 at 13:06, Amit Langote wrote: >> Mind you, that idea has some problems anyway in the face of default >> partitions, null partitions, and list partitions which accept >> non-contiguous values (e.g. one partition for 1, 3, 5; another for 2, >> 4, 6).

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-31 Thread Robert Haas
On Thu, Aug 31, 2017 at 2:56 AM, Ashutosh Bapat wrote: > Here are the patches revised a bit. I have esp changed the variable > names and arguments to reflect their true role in the functions. Also > updated prologue of expand_single_inheritance_child() to mention

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-31 Thread Robert Haas
On Thu, Aug 31, 2017 at 3:36 AM, Amit Langote wrote: > ISTM, the primary motivation for the EIBO patch at this point is to get > the partitions ordered in a predictable manner so that the partition-wise > join patch and update partition key patches could implement

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-31 Thread Amit Langote
On 2017/08/31 4:45, Robert Haas wrote: > On Wed, Aug 30, 2017 at 12:47 PM, Ashutosh Bapat > wrote: >> +1. I think we should just pull out the OIDs from partition descriptor. > > Like this? The first patch refactors the expansion of a single child > out into a

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-31 Thread Ashutosh Bapat
On Thu, Aug 31, 2017 at 1:15 AM, Robert Haas wrote: > On Wed, Aug 30, 2017 at 12:47 PM, Ashutosh Bapat > wrote: >> +1. I think we should just pull out the OIDs from partition descriptor. > > Like this? The first patch refactors the

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-30 Thread Robert Haas
On Wed, Aug 30, 2017 at 12:47 PM, Ashutosh Bapat wrote: > +1. I think we should just pull out the OIDs from partition descriptor. Like this? The first patch refactors the expansion of a single child out into a separate function, and the second patch implements

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-30 Thread Ashutosh Bapat
On Wed, Aug 30, 2017 at 9:42 PM, Robert Haas wrote: > On Wed, Aug 30, 2017 at 6:08 AM, Amit Khandekar > wrote: >> On 25 August 2017 at 23:58, Robert Haas wrote: >>> That just leaves indexes. In a world where keystate,

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-30 Thread Robert Haas
On Wed, Aug 30, 2017 at 6:08 AM, Amit Khandekar wrote: > On 25 August 2017 at 23:58, Robert Haas wrote: >> That just leaves indexes. In a world where keystate, tupslot, and >> tupmap are removed from the PartitionDispatchData, you must need >>

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-30 Thread Robert Haas
On Wed, Aug 30, 2017 at 10:31 AM, Robert Haas wrote: > On Wed, Aug 30, 2017 at 9:22 AM, Ashutosh Bapat > wrote: >> Amit's patches seem to be addressing the third point here. But the >> expansion is not happening in breadth-first manner. We

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-30 Thread Robert Haas
On Wed, Aug 30, 2017 at 9:22 AM, Ashutosh Bapat wrote: > Amit's patches seem to be addressing the third point here. But the > expansion is not happening in breadth-first manner. We are expanding > all the partitioned partitions first and then leaf partitions. So >

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-30 Thread Ashutosh Bapat
On Wed, Aug 30, 2017 at 8:33 AM, Robert Haas wrote: > On Tue, Aug 29, 2017 at 10:36 PM, Amit Langote > wrote: >>> I keep having the feeling that this is a big patch with a small patch >>> struggling to get out. Is it really necessary to

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-30 Thread Amit Khandekar
On 25 August 2017 at 23:58, Robert Haas wrote: > > That just leaves indexes. In a world where keystate, tupslot, and > tupmap are removed from the PartitionDispatchData, you must need > indexes or there would be no point in constructing a > PartitionDispatchData object in

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-30 Thread Amit Langote
On 2017/08/30 12:03, Robert Haas wrote: > On Tue, Aug 29, 2017 at 10:36 PM, Amit Langote > wrote: >>> I keep having the feeling that this is a big patch with a small patch >>> struggling to get out. Is it really necessary to change >>>

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-29 Thread Robert Haas
On Tue, Aug 29, 2017 at 10:36 PM, Amit Langote wrote: >> I keep having the feeling that this is a big patch with a small patch >> struggling to get out. Is it really necessary to change >> RelationGetPartitionDispatchInfo so much or could you just do a really >>

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-29 Thread Amit Langote
On 2017/08/29 4:26, Robert Haas wrote: > I think this patch could be further simplified by continuing to use > the existing function signature for RelationGetPartitionDispatchInfo > instead of changing it to return a List * rather than an array. I > don't see any benefit to such a change. The

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-28 Thread Robert Haas
On Mon, Aug 28, 2017 at 6:38 AM, Amit Langote wrote: > I am worried about the open relcache reference in PartitionDispatch when > we start using it in the planner. Whereas there is a ExecEndModifyTable() > as a suitable place to close that reference, there doesn't

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-28 Thread Amit Langote
On 2017/08/26 3:28, Robert Haas wrote: > On Mon, Aug 21, 2017 at 2:10 AM, Amit Langote > wrote: >> [ new patches ] > > I am failing to understand the point of separating PartitionDispatch > into PartitionDispatch and PartitionTableInfo. That seems like an >

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-25 Thread Robert Haas
On Mon, Aug 21, 2017 at 2:10 AM, Amit Langote wrote: > [ new patches ] I am failing to understand the point of separating PartitionDispatch into PartitionDispatch and PartitionTableInfo. That seems like an unnecessary multiplication of entities, as does the

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-21 Thread Amit Langote
On 2017/08/21 13:11, Ashutosh Bapat wrote: > On Sat, Aug 19, 2017 at 1:21 AM, Robert Haas wrote: >> On Fri, Aug 18, 2017 at 1:17 AM, Ashutosh Bapat >> wrote: >>> 0004 patch in partition-wise join patchset has code to expand >>> partition

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-21 Thread Amit Langote
Hi Amit, On 2017/08/17 21:18, Amit Khandekar wrote: > Anyways, some more comments : > > In ExecSetupPartitionTupleRouting(), not sure why ptrinfos array is an > array of pointers. Why can't it be an array of > PartitionTupleRoutingInfo structure rather than pointer to that > structure ? AFAIK,

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-20 Thread Ashutosh Bapat
On Sat, Aug 19, 2017 at 1:21 AM, Robert Haas wrote: > On Fri, Aug 18, 2017 at 1:17 AM, Ashutosh Bapat > wrote: >> 0004 patch in partition-wise join patchset has code to expand >> partition hierarchy. That patch is expanding inheritance

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-18 Thread Robert Haas
On Fri, Aug 18, 2017 at 1:17 AM, Ashutosh Bapat wrote: > 0004 patch in partition-wise join patchset has code to expand > partition hierarchy. That patch is expanding inheritance hierarchy in > depth first manner. Robert commented that instead of depth first >

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-18 Thread Amit Khandekar
On 18 August 2017 at 10:55, Amit Langote wrote: > On 2017/08/18 4:54, Robert Haas wrote: >> On Thu, Aug 17, 2017 at 8:39 AM, Ashutosh Bapat >> wrote: >>> [2] had a patch with some changes to the original patch you posted. I >>>

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-17 Thread Amit Langote
On 2017/08/18 4:54, Robert Haas wrote: > On Thu, Aug 17, 2017 at 8:39 AM, Ashutosh Bapat > wrote: >> [2] had a patch with some changes to the original patch you posted. I >> didn't describe those changes in my mail, since they rearranged the >> comments. Those

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-17 Thread Ashutosh Bapat
On Fri, Aug 18, 2017 at 10:32 AM, Amit Khandekar wrote: > > I think in the final changes after applying all 3 patches, the > redundant tuple slot is no longer present. But ... >> We don't really need the PartitionDispatch objects either, >> except for the OIDs they

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-17 Thread Amit Khandekar
On 18 August 2017 at 01:24, Robert Haas wrote: > On Thu, Aug 17, 2017 at 8:39 AM, Ashutosh Bapat > wrote: >> [2] had a patch with some changes to the original patch you posted. I >> didn't describe those changes in my mail, since they

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-17 Thread Ashutosh Bapat
On Fri, Aug 18, 2017 at 10:12 AM, Amit Langote wrote > >>> 0002: Teach expand_inherited_rtentry to use partition bound order >> >> 0004 in [1] expands a multi-level partition hierarchy into similar >> inheritance hierarchy. That patch doesn't need all OIDs in one

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-17 Thread Amit Langote
Hi Ashutosh, On 2017/08/17 21:39, Ashutosh Bapat wrote: > On Thu, Aug 17, 2017 at 12:59 PM, Amit Langote > wrote: >> >> Attached rest of the patches. 0001 has changes per Ashutosh's review >> comments [2]: >> >> 0001: Relieve RelationGetPartitionDispatchInfo() of

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-17 Thread Robert Haas
On Thu, Aug 17, 2017 at 8:39 AM, Ashutosh Bapat wrote: > [2] had a patch with some changes to the original patch you posted. I > didn't describe those changes in my mail, since they rearranged the > comments. Those changes are not part of this patch and you

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-17 Thread Ashutosh Bapat
On Thu, Aug 17, 2017 at 12:59 PM, Amit Langote wrote: > > Attached rest of the patches. 0001 has changes per Ashutosh's review > comments [2]: > > 0001: Relieve RelationGetPartitionDispatchInfo() of doing any locking [2] had a patch with some changes to the

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-17 Thread Amit Khandekar
On 17 August 2017 at 06:39, Amit Langote wrote: > Hi Amit, > > Thanks for the comments. > > On 2017/08/16 20:30, Amit Khandekar wrote: >> On 16 August 2017 at 11:06, Amit Langote >> wrote: >> >>> Attached updated patches. >> >>

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-17 Thread Amit Langote
On 2017/08/17 10:09, Amit Langote wrote: > On 2017/08/16 20:30, Amit Khandekar wrote: >> On 16 August 2017 at 11:06, Amit Langote >> wrote: >> I am not >> sure whether we are planning to commit these two things together or >> incrementally : >> 1. Expand in bound

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-16 Thread Ashutosh Bapat
On Thu, Aug 17, 2017 at 10:54 AM, Amit Langote wrote: > On 2017/08/17 13:56, Ashutosh Bapat wrote: >> On Thu, Aug 17, 2017 at 8:06 AM, Amit Langote >> wrote: >>> On 2017/08/17 11:22, Robert Haas wrote: On Wed, Aug 16, 2017 at

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-16 Thread Amit Langote
On 2017/08/17 13:56, Ashutosh Bapat wrote: > On Thu, Aug 17, 2017 at 8:06 AM, Amit Langote > wrote: >> On 2017/08/17 11:22, Robert Haas wrote: >>> On Wed, Aug 16, 2017 at 10:12 PM, Amit Langote >>> wrote: > In the catalogs we are

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-16 Thread Ashutosh Bapat
On Thu, Aug 17, 2017 at 8:06 AM, Amit Langote wrote: > On 2017/08/17 11:22, Robert Haas wrote: >> On Wed, Aug 16, 2017 at 10:12 PM, Amit Langote >> wrote: In the catalogs we are using full "partitioned" e.g. pg_partitioned_table.

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-16 Thread Amit Langote
On 2017/08/17 11:22, Robert Haas wrote: > On Wed, Aug 16, 2017 at 10:12 PM, Amit Langote > wrote: >>> In the catalogs we are using full "partitioned" e.g. pg_partitioned_table. >>> May >>> be we should name the column as "inhchildpartitioned". >> >> Sure. > > I

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-16 Thread Robert Haas
On Wed, Aug 16, 2017 at 10:12 PM, Amit Langote wrote: >> In the catalogs we are using full "partitioned" e.g. pg_partitioned_table. >> May >> be we should name the column as "inhchildpartitioned". > > Sure. I suggest inhpartitioned or inhispartition.

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-16 Thread Amit Langote
Hi Ashutosh, Thanks for the review and the updated patch. On 2017/08/16 21:48, Ashutosh Bapat wrote: > On Wed, Aug 16, 2017 at 11:06 AM, Amit Langote > wrote: > >> >>> This patch series is blocking a bunch of other things, so it would be >>> nice if you could

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-16 Thread Amit Langote
Hi Amit, Thanks for the comments. On 2017/08/16 20:30, Amit Khandekar wrote: > On 16 August 2017 at 11:06, Amit Langote > wrote: > >> Attached updated patches. > > Thanks Amit for the patches. > > I too agree with the overall approach taken for keeping the

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-16 Thread Ashutosh Bapat
On Wed, Aug 16, 2017 at 11:06 AM, Amit Langote wrote: > >> This patch series is blocking a bunch of other things, so it would be >> nice if you could press forward with this quickly. > > Attached updated patches. > Review for 0001. The attached patch has some

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-16 Thread Amit Khandekar
On 16 August 2017 at 11:06, Amit Langote wrote: > Attached updated patches. Thanks Amit for the patches. I too agree with the overall approach taken for keeping the locking order consistent: it's best to do the locking with the existing find_all_inheritors()

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-15 Thread Amit Langote
Thanks for the review. On 2017/08/16 2:27, Robert Haas wrote: > On Wed, Aug 9, 2017 at 10:11 PM, Amit Langote > wrote: >>> P.S. While I haven't reviewed 0002 in detail, I think the concept of >>> minimizing what needs to be built in RelationGetPartitionDispatchInfo

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-15 Thread Amit Langote
On 2017/08/10 18:52, Beena Emerson wrote: > Hi Amit, > > On Thu, Aug 10, 2017 at 7:41 AM, Amit Langote > wrote: >> On 2017/08/05 2:25, Robert Haas wrote: >>> Concretely, my proposal is: >>> >>> P.S. While I haven't reviewed 0002 in detail, I think the concept of

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-15 Thread Robert Haas
On Wed, Aug 9, 2017 at 10:11 PM, Amit Langote wrote: >> P.S. While I haven't reviewed 0002 in detail, I think the concept of >> minimizing what needs to be built in RelationGetPartitionDispatchInfo >> is a very good idea. > > I put this patch ahead in the list and

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-10 Thread Beena Emerson
Hi Amit, On Thu, Aug 10, 2017 at 7:41 AM, Amit Langote wrote: > On 2017/08/05 2:25, Robert Haas wrote: >> Concretely, my proposal is: >> >> P.S. While I haven't reviewed 0002 in detail, I think the concept of >> minimizing what needs to be built in

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-09 Thread Amit Langote
On 2017/08/05 2:25, Robert Haas wrote: > Concretely, my proposal is: > > 1. Before calling RelationGetPartitionDispatchInfo, the calling code > should use find_all_inheritors to lock all the relevant relations (or > the planner could use find_all_inheritors to get a list of relation > OIDs, store

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-07 Thread Amit Langote
On 2017/08/08 4:34, Robert Haas wrote: > On Mon, Aug 7, 2017 at 2:54 AM, Amit Langote > wrote: >> As long as find_all_inheritors() is a place only to determine the order in >> which partitions will be locked, it's fine. My concern is about the time >> of actual

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-07 Thread Amit Langote
On 2017/08/07 14:37, Amit Khandekar wrote: > On 4 August 2017 at 22:55, Robert Haas wrote: >> P.S. While I haven't reviewed 0002 in detail, I think the concept of >> minimizing what needs to be built in RelationGetPartitionDispatchInfo >> is a very good idea. > > True. I

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-07 Thread Robert Haas
On Mon, Aug 7, 2017 at 2:54 AM, Amit Langote wrote: > I think Amit Khandekar mentioned this on the UPDATE partition key thread [1]. Yes, similar discussion. > As long as find_all_inheritors() is a place only to determine the order in > which partitions will be

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-07 Thread Robert Haas
On Mon, Aug 7, 2017 at 1:48 AM, Ashutosh Bapat wrote: > with the way schema is designed. May be it's better to use your idea > of using get_rel_relkind() or find a way to check that the flag is in > sync with the relkind, like when building the relcache. That's

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-07 Thread Amit Langote
On 2017/08/05 2:25, Robert Haas wrote: > On Fri, Aug 4, 2017 at 3:38 AM, Amit Langote > wrote: >> The current way to expand inherited tables, including partitioned tables, >> is to use either find_all_inheritors() or find_inheritance_children() >> depending on the

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-07 Thread Ashutosh Bapat
On Mon, Aug 7, 2017 at 11:18 AM, Ashutosh Bapat wrote: >> >> One objection to this line of attack is that there might be a good >> case for locking only the partitioned inheritors first and then going >> back and locking the leaf nodes in a second pass, or even

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-06 Thread Ashutosh Bapat
On Fri, Aug 4, 2017 at 10:55 PM, Robert Haas wrote: > On Fri, Aug 4, 2017 at 3:38 AM, Amit Langote > wrote: >> The current way to expand inherited tables, including partitioned tables, >> is to use either find_all_inheritors() or

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-06 Thread Amit Langote
On 2017/08/04 20:28, Ashutosh Bapat wrote: > On Fri, Aug 4, 2017 at 1:08 PM, Amit Langote > wrote: >> The current way to expand inherited tables, including partitioned tables, >> is to use either find_all_inheritors() or find_inheritance_children() >> depending on

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-06 Thread Amit Khandekar
On 4 August 2017 at 22:55, Robert Haas wrote: > > 1. Before calling RelationGetPartitionDispatchInfo, the calling code > should use find_all_inheritors to lock all the relevant relations (or > the planner could use find_all_inheritors to get a list of relation > OIDs, store

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-04 Thread Robert Haas
On Fri, Aug 4, 2017 at 3:38 AM, Amit Langote wrote: > The current way to expand inherited tables, including partitioned tables, > is to use either find_all_inheritors() or find_inheritance_children() > depending on the context. They return child table OIDs in the

Re: [HACKERS] expanding inheritance in partition bound order

2017-08-04 Thread Ashutosh Bapat
On Fri, Aug 4, 2017 at 1:08 PM, Amit Langote wrote: > The current way to expand inherited tables, including partitioned tables, > is to use either find_all_inheritors() or find_inheritance_children() > depending on the context. They return child table OIDs in the