Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3eZR-0001tg-R0 for pgadmin-hackers@arkaria.postgresql.org; Thu, 27 Apr 2017 08:14:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d3eZQ-00089Z-Pl for pgadmin-hackers@arkaria.postgresql.org; Thu, 27 Apr 2017 08:14:36 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d3eZC-0007kr-36 for pgadmin-hackers@postgresql.org; Thu, 27 Apr 2017 08:14:22 +0000 Received: from mail-io0-x22d.google.com ([2607:f8b0:4001:c06::22d]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d3eZ8-0001vI-Ed for pgadmin-hackers@postgresql.org; Thu, 27 Apr 2017 08:14:20 +0000 Received: by mail-io0-x22d.google.com with SMTP id k87so18131923ioi.0 for ; Thu, 27 Apr 2017 01:14:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=6c1VioCzvXcOqS1xBGyR/Sn+bysjCoi/pYetJY1iVMA=; b=1EjROGo/jdKtb5akkfJ0CDfq5qmZvarzz2GlCcucTtSxKaH5Mtv1ALxVBIziQ3jR91 FBmB9AxIPP3dxUutzdRIGlMrmQ1n2HGx4uXtYXX2qRByr8g6eCeOWdiG4LqGFa285G3L CaZkGQCisQNO9HX9ru1BmbntaiQFOh8f7TGxm0PKJU7DNQN9AZLxyY/FAbIDRMIV1pIY Uyf8sIMxk+CYOWrFYUwGTAUULcvPkHU2BSqOWss2kx3ba9IdWCH3WYbeRDfBppC/ilNH HHuaufwgYRgsI6iA7sRsVtkYMIsVHDN29DEwypm9+vFk2el4RZ/sWGHmXK9jWwhrBPZf VWng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=6c1VioCzvXcOqS1xBGyR/Sn+bysjCoi/pYetJY1iVMA=; b=uSYIxRJBeXetv8i1ywt7d7MoH8EyutoAx69HnpQ2OUW5Lbl8KmxJQEKZmolfdeQIAE FmmCQiuNf/yCDUjQl39jcung0qwCcvuOpH+R6YuXHbBM9ddybiAYOY4LhLTceAG7hj17 OrLtA1TiKc6zVbr98sJOqJec1PjW225kupf+uc7zFgi6ZhFPxangZVBQGpBIsEnWvRwA OjkeBLsYd0DbYOgKGd7Y6YW2ymKsTU8QI7pm7pkx+SgrbIAE270ow7VlvMEIN+rNj6IZ 6j4ul+iOwrWmmMiGCj1RUOC1I633P3S5DlUlivlkZlxkt6TWSl2aB3VBOCa25C1aJRsR x/Eg== X-Gm-Message-State: AN3rC/62aOmTipq8vzhklpDoyxmhc1L7vGJPvbixFKs5rx3WeN1msxJ5 Ip0kZcy3C3NrXqTy/AY3Y308OZjJBg== X-Received: by 10.107.46.86 with SMTP id i83mr3554986ioo.84.1493280857387; Thu, 27 Apr 2017 01:14:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.174.167 with HTTP; Thu, 27 Apr 2017 01:14:16 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Thu, 27 Apr 2017 09:14:16 +0100 Message-ID: Subject: Re: Declarative partitioning in pgAdmin4 To: Shirley Wang Cc: Akshay Joshi , pgadmin-hackers Content-Type: multipart/alternative; boundary=001a1137949e0e0a4b054e218b32 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --001a1137949e0e0a4b054e218b32 Content-Type: text/plain; charset=UTF-8 On Wed, Apr 26, 2017 at 6:36 PM, Shirley Wang wrote: > Hello! > > On Wed, Apr 26, 2017 at 4:26 AM Dave Page wrote: > >> Hi >> >> [moving to the pgadmin-hackers mailing list as this a pgAdmin feature] >> >> On Wed, Apr 26, 2017 at 8:20 AM, Akshay Joshi < >> akshay.joshi@enterprisedb.com> wrote: >> >>> Hi Dave >>> >>> Murtuza and I started thinking about "How to add Declarative >>> Partitioning" support in pgAdmin4. We thought instead of showing Partition >>> Table under existing Tables collection, we should add new collection node >>> "Partition Tables". Showing table under the table node recursively will >>> require lots of code changes in table and it's child nodes (column, index, >>> trigger, etc..) which is more complex and error prone. >>> >> >> Perhaps, but from the user's perspective, there's no reason to list them >> separately - they are just tables with a different structure from others. >> We shouldn't confuse the user just because it's more convenient for us. >> >> I really think it should look like this: >> >> - Tables >> - t1 >> - Columns >> - Constraints >> - Partitions >> - p1 >> - Sub Objects (whatever they may be) >> ... >> - p2 >> ... >> - t2 >> ... >> >> > >> >>> >>> Below is the design that we can implement: >>> >>> - Create new "Partition Tables" collection node. User will be able >>> to create partition table by clicking "Create -> Partition Table" menu that >>> we will add on collection node. We will share the dialog prototype >>> later once we will have complete understanding of it. >>> >>> Can you share a mock-up of the dialog? The Figma tool that Shirley >> shared looks like it'll be good for doing that - I can invite you to the >> team. >> > >>> - Once table is created user will be able to create partitions by >>> clicking "Create -> Partitions" menu will be added on each partitioned >>> table node. We will share the dialog prototype later once we will >>> have complete understanding of it. >>> >>> I would expect the user to be able to define the partitioning scheme >> when they create the table; e.g. on a new tab. It shouldn't be a two step >> process. >> >>> >>> - We will have to show sub nodes like (column, index, trigger, >>> constraints, etc..) on main table while some of the sub nodes won't require >>> for partitions like (column and many more again require some more knowledge >>> on partitioning). >>> >>> OK. >> >> >>> Apart from above we will have to figure out following: >>> >>> - How to remove partitions(table) from existing tables node as value >>> of relkind column is 'r' for partitions. >>> - Partitioning scheme to show in SQL pane for partitions. >>> - Some unknown issue/features of Declarative partitioning. >>> >>> OK. >> > > Seems like there are a couple of assumptions being made here: > - Users need to see partitioned tables when expanding parent table > If by "assumption" you mean "fact", then yes :-). Users need to be able to see and manipulate partitions. Whilst some sub-objects are defined on the parent table (e.g. the columns), others are defined on the individual partitions (e.g. triggers, indexes). > - Users need to view partitioned tables in context to their parent table > (Dave says yes, Akshay and Murtuza say no) > That's not what was said. Akshay and Murtuza were proposing a new collection node, e.g. - Schema - Functions - Partitioned Tables - Tables - Views I'm saying that that unnecessarily complicates things for the user. The fact that a table happens to use declarative partitioning, doesn't make it a different type of object as far as Postgres is concerned, nor should it for us. > - Users want to create a partitioned table through the browser (Akshay and > Murtuza say yes, Dave says no) > I didn't say that. I said it shouldn't be a two-part process. > > Plus some technical concerns: > - Making code changes in table is complex and error prone > - How to move partitions from one node to another > > I think the first assumption is important to validate or invalidate before > even thinking about how to implement or addressing technical concerns. We > may come to learn that there are solutions that don't require a lot of > technical maneuvering, or perhaps learn there's no need for change at all. > > Akshay and Murtuza, I'm happy to work with you on doing some research > (interviews to discover user needs and pains, creating mockups, getting > feedback etc) and coming up with some solutions based on user feedback. > How would users come up with feedback, given that the feature doesn't exist in the field yet? -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --001a1137949e0e0a4b054e218b32 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Wed, Apr 26, 2017 at 6:36 PM, Shirley Wang <swang@pivotal.io>= wrote:
Hello!
On = Wed, Apr 26, 2017 at 4:26 AM Dave Page <dpage@pgadmin.org> wrote:
Hi

[moving to the = pgadmin-hackers mailing list as this a pgAdmin feature]

On Wed, Apr 26, 2017 at 8:20 AM, = Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi Dave
Murtuza and I started thinking about "How = to add Declarative Partitioning" support in pgAdmin4. We thought inste= ad of showing Partition Table under existing Tables collection, we should a= dd new collection node "Partition Tables". Showing table under th= e table node recursively will require lots of code changes in table and it&= #39;s child nodes (column, index, trigger, etc..) which is more complex and= error prone.=C2=A0

Perhaps, bu= t from the user's perspective, there's no reason to list them separ= ately - they are just tables with a different structure from others. We sho= uldn't confuse the user just because it's more convenient for us.

I really think it should look like this:
=
- Tables
=C2=A0 - t1
=C2=A0 =C2=A0 - Col= umns
=C2=A0 =C2=A0 - Constraints
=C2=A0 =C2=A0 - Partit= ions
=C2=A0 =C2=A0 =C2=A0 - p1
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 - Sub Objects (whatever they may be)
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 ...
=C2=A0 =C2=A0 =C2=A0 - p2
=C2=A0 =C2=A0 =C2=A0 = ...
=C2=A0 - t2
=C2=A0 ...
=C2=A0 =C2=A0
= =C2=A0

=
Below is the design that we can implement:=C2=A0
  • Cre= ate new "Partition Tables" collection node. User will be able to = create partition table by clicking "Create -> Partition Table"= menu that we will add on collection node.=C2=A0We will share the dialog prototype later once we will have complete understanding of = it.
Can you share a mock-up of the d= ialog? The Figma tool that Shirley shared looks like it'll be good for = doing that - I can invite you to the team.=C2=A0
  • Once table is created user will be= able to create partitions by clicking "Create -> Partitions" = menu will be added on each partitioned table node. We will share the dialog prototype later once we will have complete understanding o= f it.
I would expect the user to be = able to define the partitioning scheme when they create the table; e.g. on = a new tab. It shouldn't be a two step process.=C2=A0
  • We will have to show sub no= des like (column, index, trigger, constraints, etc..) on main table while s= ome of the sub nodes won't require for partitions like (column and many= more again require some more knowledge on partitioning).
OK.
=C2=A0
Apart from above we will have to figure out f= ollowing:
  • How to remove partitions(table) from existing t= ables node as value of relkind column is 'r' for pa= rtitions.
  • Partitioning scheme to show in SQL pane f= or partitions.
  • Some unknown issue/features of Declarative parti= tioning.=C2=A0
OK.
=

Seems like there are a c= ouple of assumptions being made here:
- Users need to see partiti= oned tables when expanding parent table
<= div>
If by "assumption" you mean "fact", = then yes :-). Users need to be able to see and manipulate partitions. Whils= t some sub-objects are defined on the parent table (e.g. the columns), othe= rs are defined on the individual partitions (e.g. triggers, indexes).
=
=C2=A0
- Users need to view partitioned tables in= context to their parent table (Dave says yes, Akshay and Murtuza say no)

That's not what was sa= id. Akshay and Murtuza were proposing a new collection node, e.g.

- Schema
=C2=A0 - Functions
=C2=A0 - Pa= rtitioned Tables
=C2=A0 - Tables
=C2=A0 - Views

I'm saying that that unnecessarily complicates things= for the user. The fact that a table happens to use declarative partitionin= g, doesn't make it a different type of object as far as Postgres is con= cerned, nor should it for us.
=C2=A0
- Users want = to create a partitioned table through the browser (Akshay and Murtuza say y= es, Dave says no)

I didn't say that. I said it shouldn't be a two-part process.
=C2=A0

Plus some tec= hnical concerns:
- Making code changes in table is complex and er= ror prone
- How to move partitions from one node to another
=

I think the first assumption is important to validate o= r invalidate before even thinking about how to implement or addressing tech= nical concerns. We may come to learn that there are solutions that don'= t require a lot of technical maneuvering, or perhaps learn there's no n= eed for change at all.

Ak= shay and Murtuza, I'm happy to work with you on doing some research (in= terviews to discover user needs and pains, creating mockups, getting feedba= ck etc) and coming up with some solutions based on user feedback.

How would users come up with feedb= ack, given that the feature doesn't exist in the field yet?=C2=A0
=

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake=

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Compan= y
--001a1137949e0e0a4b054e218b32--