Re: [Sender Address Forgery]Re: pg_(total_)relation_size andpartitioned tables - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [Sender Address Forgery]Re: pg_(total_)relation_size andpartitioned tables
Date
Msg-id 20180126124552.GJ17847@paquier.xyz
Whole thread Raw
In response to Re: [Sender Address Forgery]Re: pg_(total_)relation_size andpartitioned tables  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Responses Re: [Sender Address Forgery]Re: pg_(total_)relation_size andpartitioned tables
List pgsql-hackers
On Fri, Jan 26, 2018 at 07:00:43PM +0900, Amit Langote wrote:
> I wonder what pg_partition_tree_tables() should return when passed a table
> that doesn't have partitions under it?  Return a 1-member set containing
> itself?

Yes.  A table alone is itself part of a partition set, so the result
should be made of only itself.

> I also mean for tables that may inheritance children established
> through plain old inheritance.

There could be value in having a version dedicated to inheritance trees
as well, true enough.  As well as value in having something that shows
both.  Still let's not forget that partition sets are structured so as
the parents have no data, so I see more value in having only partitions
listed, without the INHERIT part.  Opinions from others are of course
welcome.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: list partition constraint shape
Next
From: Antonin Houska
Date:
Subject: Re: [HACKERS] WIP: Aggregation push-down