Re: ToDo: show size of partitioned table

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: alvherre(at)2ndquadrant(dot)com
Cc: Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp, pavel(dot)stehule(at)gmail(dot)com, pryzby(at)telsasoft(dot)com, michael(at)paquier(dot)xyz, mathias(at)brossard(dot)org, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: ToDo: show size of partitioned table
Date: 2019-04-03 03:02:09
Message-ID: 20190403.120209.259853618.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Tue, 2 Apr 2019 22:49:25 -0300, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote in <20190403014925(dot)GA9976(at)alvherre(dot)pgsql>
> Hi Amit
>
> On 2019-Apr-03, Amit Langote wrote:
>
> > Thanks. I'm getting an error while applying v12:
> >
> > patching file src/bin/psql/po/es.po
> > Hunk #1 FAILED at 12.
> > 1 out of 2 hunks FAILED -- saving rejects to file src/bin/psql/po/es.po.rej
>
> Uh, I certainly did not intend to send the es.po part of the patch, I
> was just testing that the translation worked as intended. That's what I
> get for doing stuff till the last minute ...

\dPn doesn't show children because the are of 'r' relkind. And
\dPn * doesn't show type for children.

create table pa (a int, b int) partition by range (a);
create table c1 partition of pa for values from (0) to (10);
create table c2 partition of pa for values from (10) to (20);
create index on pa(a);

postgres=# \dPn *
List of partitioned tables and indexes
Schema | Name | Owner | Type | Parent name | On table
--------+----------+----------+-------------------+-------------+----------
public | pa | horiguti | partitioned table | |
public | pa_a_idx | horiguti | partitioned index | | pa
(2 rows)

With the attached on top of the latest patch, we get the following result.

postgres=# \dPn *
List of partitioned tables and indexes
Schema | Name | Owner | Type | Parent name | On table
--------+----------+----------+-------------------+-------------+----------
public | c1 | horiguti | partition table | pa |
public | c1_a_idx | horiguti | partition index | pa_a_idx | c1
public | c2 | horiguti | partition table | pa |
public | c2_a_idx | horiguti | partition index | pa_a_idx | c2
public | pa | horiguti | partitioned table | |
public | pa_a_idx | horiguti | partitioned index | | pa
(6 rows)

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
psql-dP-12-show-children.patch text/x-patch 639 bytes
psql-dP-12-show-children-type.patch text/x-patch 799 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2019-04-03 03:10:03 Re: New vacuum option to do only freezing
Previous Message Amit Kapila 2019-04-03 02:59:15 Re: Transaction commits VS Transaction commits (with parallel) VS query mean time