From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | Craig Ringer <craig(at)2ndquadrant(dot)com>, Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: New partitioning - some feedback |
Date: | 2017-07-10 17:34:58 |
Message-ID: | 20170710173458.GA13100@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jul 10, 2017 at 04:15:28PM +0900, Amit Langote wrote:
> On 2017/07/10 15:32, Craig Ringer wrote:
> > On 8 July 2017 at 00:03, David Fetter <david(at)fetter(dot)org> wrote:
> >
> >> On Fri, Jul 07, 2017 at 10:29:26AM +0900, Amit Langote wrote:
> >>> Hi Mark,
> >>>
> >>> On 2017/07/07 9:02, Mark Kirkwood wrote:
> >>>> I've been trying out the new partitioning in version 10. Firstly, I
> >> must
> >>>> say this is excellent - so much nicer than the old inheritance based
> >> method!
> >>>
> >>> Thanks. :)
> >>>
> >>>> My only niggle is the display of partitioned tables via \d etc. e.g:
> >>>>
> >>>> part=# \d
> >>>> List of relations
> >>>> Schema | Name | Type | Owner
> >>>> --------+----------------------+-------+----------
> >>>> public | date_fact | table | postgres
> >>>> public | date_fact_201705 | table | postgres
> >>>> public | date_fact_201706 | table | postgres
> >>>> public | date_fact_20170601 | table | postgres
> >>>> public | date_fact_2017060100 | table | postgres
> >>>> public | date_fact_201707 | table | postgres
> >>>> public | date_fact_rest | table | postgres
> >>>> (7 rows)
> >>
> >> Would showing relispartition=tru tables only in \d+ fix this?
> >> <http://www.postgresql.org/mailpref/pgsql-hackers>
> >>
> >
> > I think so.
>
> I posted a patch upthread which makes \d hide partitions (relispartition =
> true relations) and include them if the newly proposed '!' modifier is
> specified. The '+' modifier is being used to show additional detail of
> relations chosen to be listed at all, so it seemed like a bad idea to
> extend its meaning to also dictate whether partitions are to be listed.
> We have a separate 'S' modifier to ask to list system objects (which are,
> by default hidden), so it made sense to me to add yet another modifier
> (aforementioned '!') for partitions.
We have already made '+' signal "more detail, unspecified," for a lot
of different cases. If partitions are just "more detail" about a
table, which is the direction we've decided to go, it makes sense to
list them under the rubric of '+' rather than inventing yet another
hunk of syntax to psql's already confusing \ commands.
> > I'd like to add a flag of some kind to \d column output that marks a table
> > as having partitions, but I can't think of anything narrow enough and still
> > useful.
>
> Actually, if \d had shown RELKIND_PARTITIONED_TABLE tables as of Type
> "partitioned table", we wouldn't need a separate flag for marking a table
> as having partitions. But we've avoided using that term ("partitioned
> table") in the error messages and such, so wouldn't perhaps be a good idea
> to do that here. But I wonder if we (also) want to distinguish
> partitioned tables from regular tables? I understood that there is some
> desire for partitions be distinguished when they are listed in the output,
> either by default or by using a modifier.
+1 for showing that they're a different beast.
Best,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2017-07-10 18:40:08 | RFC: Key normalization for nbtree |
Previous Message | Tom Lane | 2017-07-10 16:18:53 | Re: BUG #14738: ALTER SERVER for foregin servers not working |