Re: [Sender Address Forgery]Re: pg_(total_)relation_size and partitioned tables

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [Sender Address Forgery]Re: pg_(total_)relation_size and partitioned tables
Date: 2018-01-29 01:08:51
Message-ID: 75294d6a-ff21-58a9-d4e6-56b412ef3ae5@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2018/01/27 3:32, Robert Haas wrote:
> On Fri, Jan 26, 2018 at 7:45 AM, Michael Paquier
> <michael(dot)paquier(at)gmail(dot)com> wrote:
>> 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.
>
> Well, partitioning and inheritance can't be mixed. A given table has
> either partitions OR inheritance children OR neither.

That's true.

> If it has
> either partitions or inheritance children, find_all_inheritors will
> return them. Otherwise, I think it'll just return the input OID
> itself. So I don't quite see, if we're going to add a convenience
> function here, why wouldn't just define it to return the same results
> as find_all_inheritors does?

So if all we're doing is trying to make find_all_inheritors() accessible
to users through SQL, it makes sense to call it
pg_get_inheritance_tables() rather than pg_partition_tree_tables().

Thanks,
Amit

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2018-01-29 01:43:54 Re: Redefining inet_net_ntop
Previous Message Amit Langote 2018-01-29 00:50:50 Re: list partition constraint shape