Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3Qrq-0002Kz-OE for pgadmin-hackers@arkaria.postgresql.org; Wed, 26 Apr 2017 17:36:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d3Qrq-00059P-6H for pgadmin-hackers@arkaria.postgresql.org; Wed, 26 Apr 2017 17:36:42 +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 1d3Qra-0003qa-Nt for pgadmin-hackers@postgresql.org; Wed, 26 Apr 2017 17:36:27 +0000 Received: from mail-oi0-x236.google.com ([2607:f8b0:4003:c06::236]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d3QrX-0000At-IH for pgadmin-hackers@postgresql.org; Wed, 26 Apr 2017 17:36:25 +0000 Received: by mail-oi0-x236.google.com with SMTP id j201so9471623oih.2 for ; Wed, 26 Apr 2017 10:36:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pivotal-io.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LXh0B/ioMl0vOnNYCPQxOCnkpQJF5xC75sye6DYi9hQ=; b=rm804bBz6IdcGgI0+ASIOdK5BJniodV/DtC5IjiDVQ+Tk+oJRDUsN0St6ZlSET8jz6 5DWTNb6/SBJ+sqZfkkps4YOltiA+EkT5oo0mnKuRBei+sRFirf9OFSmo+opPMRszB/dN hhrkeA01O/hrfNUHlXCztVmYfGoXx48mY5lgoALrFp8L3aRGz/dEhftkc9omroP0BU72 QObL4E1Y9HQmelBns7tcPsx8KbBqhKIw0C2ezJY6ldh9mIWMCiN2HIchCJqURfrIiOFN TDOeUoxuJVtVh+5wzG5AzpSQVEAe8cQX7UMM1uh4hIx9M28fQ0BtX1wwHofKZ1Av79O2 xHZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LXh0B/ioMl0vOnNYCPQxOCnkpQJF5xC75sye6DYi9hQ=; b=VXv+5GqUOVPwgoZUiJLZko7vTCA3+ZqXOGmVAmKQ5JtVi3zwJ0IZYXCmcX+Ka5475E 6VrucDLdhPW4589UUxP6SSjiE968wcgyvhJDt6GkGeDuMY7e+cGuYkl4YvBad1A4gpOw tWAf6KFNMa1yL5rmCJNXWrH45k1uN7c9gNKw9JDvu4OYCtxgO3QkB7S9ARtuyA6dioyX AWjcXD3Nigr6gF1qh8pUfj3yi73Upem9upPJg88YOX2dTs4KWyLmJVNq4NpEOT+/2ooI 1QIV2yB8I43jrK97JQxWgF2JjDVKhv1Hy/fr31P7aydkuzWp3yjl3JG6Ajt9I6cExVlF IsAg== X-Gm-Message-State: AN3rC/4IfmnDNHfvRV5OHCblZHca+w/rggtJluki3WhZZP19WWZggvpP PBNGKkKUMQdbjK1GlV5UhIkjqiGz+XFP X-Received: by 10.202.82.205 with SMTP id g196mr488822oib.149.1493228181349; Wed, 26 Apr 2017 10:36:21 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Shirley Wang Date: Wed, 26 Apr 2017 17:36:10 +0000 Message-ID: Subject: Re: Declarative partitioning in pgAdmin4 To: Dave Page , Akshay Joshi Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary=001a113b1b0c518190054e154741 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 --001a113b1b0c518190054e154741 Content-Type: text/plain; charset=UTF-8 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 - Users need to view partitioned tables in context to their parent table (Dave says yes, Akshay and Murtuza say no) - Users want to create a partitioned table through the browser (Akshay and Murtuza say yes, Dave says no) 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. --001a113b1b0c518190054e154741 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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" sup= port in pgAdmin4. We thought instead of showing Partition Table under exist= ing Tables collection, we should add new collection node "Partition Ta= bles". Showing table under the table node recursively will require lot= s of code changes in table and it's child nodes (column, index, trigger= , etc..) which is more complex and error prone.=C2=A0

Perhaps, but from the user's perspective, there&= #39;s no reason to list them separately - they are just tables with a diffe= rent 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
=C2=A0 = - t1
=C2=A0 =C2=A0 - Columns
=C2=A0 =C2=A0 - Constraint= s
=C2=A0 =C2=A0 - Partitions
=C2=A0 =C2=A0 =C2=A0 - p1<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 - Sub Objects (whatever they may be)<= /div>
=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
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">
=C2=A0

Below is the design that we can im= plement:=C2=A0
  • Create new "Partition Tables" co= llection node. User will be able to create partition table by clicking &quo= t;Create -> Partition Table" menu that we will add on collection no= de.=C2=A0We will share the dialog prototype later once we will have complete und= erstanding of it.
Can you share a mo= ck-up of the dialog? The Figma tool that Shirley shared looks like it'l= l be good for doing that - I can invite you to the team.=C2=A0
<= /div>
  • Once table is created= user will be able to create partitions by clicking "Create -> Part= itions" menu will be added on each partitioned table node. We will sha= re the dialo= g 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 ta= b. It shouldn't be a two step process.=C2=A0
  • We will have to show sub nodes like= (column, index, trigger, constraints, etc..) on main table while some of t= he sub nodes won't require for partitions like (column and many more ag= ain require some more knowledge on partitioning).
OK.
=C2=A0
=
Apart from above we will have to figure out following= :
  • How to remove partitions(table) from existing tables no= de as value of relkind column is 'r' for partitions.
  • Partitionin= g scheme to show in SQL pane for partitions.
  • Some unknown issue/feat= ures of Declarative partitioning.=C2=A0
<= div>OK.

Seems like = there are a couple of assumptions being made here:
- Users need t= o see partitioned tables when expanding parent table
- Users = need to view partitioned tables in context to their parent table (Dave says= yes, Akshay and Murtuza say no)
- Users want to create a pa= rtitioned table through the browser (Akshay and Murtuza say yes, Dave says = no)

Plus some technical concerns:
<= div>- Making code changes in table is complex and error prone
- H= ow to move partitions from one node to another

I t= hink the first assumption is important to validate or invalidate before eve= n 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 tech= nical maneuvering, or perhaps learn there's no need for change at all.<= /div>

Akshay and Murtuza, I'm happy to work with you= on doing some research (interviews to discover user needs and pains, creat= ing mockups, getting feedback etc) and coming up with some solutions based = on user feedback.

=C2=A0
--001a113b1b0c518190054e154741--