Re: pgsql: Add pg_partition_root to display top-most parent of a partition

2019-03-22 Thread Michael Paquier
On Fri, Mar 22, 2019 at 04:05:20PM +0900, Amit Langote wrote: > Thanks, looks fine. OK, committed. -- Michael signature.asc Description: PGP signature

Re: pgsql: Add pg_partition_root to display top-most parent of a partition

2019-03-22 Thread Amit Langote
On 2019/03/22 14:13, Michael Paquier wrote: > On Fri, Mar 22, 2019 at 01:28:19PM +0900, Amit Langote wrote: >> It looked fine before, but the new lines added by patch makes it look >> wrong/misplaced somehow. > > Okay, what do you think about the attached then? Thanks, looks fine. Regards, Amit

Re: pgsql: Add pg_partition_root to display top-most parent of a partition

2019-03-21 Thread Michael Paquier
On Fri, Mar 22, 2019 at 01:28:19PM +0900, Amit Langote wrote: > It looked fine before, but the new lines added by patch makes it look > wrong/misplaced somehow. Okay, what do you think about the attached then? -- Michael diff --git a/src/backend/utils/adt/partitionfuncs.c b/src/backend/utils/adt/p

Re: pgsql: Add pg_partition_root to display top-most parent of a partition

2019-03-21 Thread Amit Langote
On 2019/03/22 13:12, Michael Paquier wrote: > On Fri, Mar 22, 2019 at 01:09:23PM +0900, Amit Langote wrote: >> /* Fetch the top-most parent */ >> ancestors = get_partition_ancestors(relid); >> >> Maybe, the patch should update this comment to say "Fetch the list of >> ancestors". > > Per

Re: pgsql: Add pg_partition_root to display top-most parent of a partition

2019-03-21 Thread Amit Langote
Sorry about the messed up subject string of my previous reply. I failed to notice that our internal mailing software occasionally adds that to email headers before the emails get to my machine. I've been asked to be careful before, but I didn't notice it again today. :-( Thanks, Amit

Re: [Suspect SPAM] Re: pgsql: Add pg_partition_root to display top-most parent of a partition

2019-03-21 Thread Michael Paquier
On Fri, Mar 22, 2019 at 01:09:23PM +0900, Amit Langote wrote: > /* Fetch the top-most parent */ > ancestors = get_partition_ancestors(relid); > > Maybe, the patch should update this comment to say "Fetch the list of > ancestors". Perhaps so. Note that actually the list is fetched to

Re: [Suspect SPAM] Re: pgsql: Add pg_partition_root to display top-most parent of a partition

2019-03-21 Thread Amit Langote
Hi, On 2019/03/22 12:55, Michael Paquier wrote: > On Fri, Mar 22, 2019 at 12:26:12AM -0300, Alvaro Herrera wrote: >> I noticed days ago that if you call pg_partition_root on the topmost >> partitioned table, the server crashes :-) I thought we already fixed that last month, but that was pg_partit

Re: pgsql: Add pg_partition_root to display top-most parent of a partition

2019-03-21 Thread Michael Paquier
On Fri, Mar 22, 2019 at 12:26:12AM -0300, Alvaro Herrera wrote: > I noticed days ago that if you call pg_partition_root on the topmost > partitioned table, the server crashes :-) It's when you think that the thing is actually done that another issue pops up. The attached fixes the issue, I sugges

Re: pgsql: Add pg_partition_root to display top-most parent of a partition

2019-03-21 Thread Alvaro Herrera
On 2019-Feb-08, Michael Paquier wrote: > Add pg_partition_root to display top-most parent of a partition tree > > This is useful when looking at partition trees with multiple layers, and > combined with pg_partition_tree, it provides the possibility to show up > an entire tree by just knowing one

pgsql: Add pg_partition_root to display top-most parent of a partition

2019-02-07 Thread Michael Paquier
Add pg_partition_root to display top-most parent of a partition tree This is useful when looking at partition trees with multiple layers, and combined with pg_partition_tree, it provides the possibility to show up an entire tree by just knowing one member at any level. Author: Michael Paquier Rev