Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3dDm-0002DD-3x for pgadmin-hackers@arkaria.postgresql.org; Thu, 27 Apr 2017 06:48:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d3dDk-0002y4-P4 for pgadmin-hackers@arkaria.postgresql.org; Thu, 27 Apr 2017 06:48:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d3dDk-0002xv-AE for pgadmin-hackers@postgresql.org; Thu, 27 Apr 2017 06:48:08 +0000 Received: from mail-pf0-x22b.google.com ([2607:f8b0:400e:c00::22b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d3dDg-0006tZ-0O for pgadmin-hackers@postgresql.org; Thu, 27 Apr 2017 06:48:07 +0000 Received: by mail-pf0-x22b.google.com with SMTP id v14so17361724pfd.2 for ; Wed, 26 Apr 2017 23:48:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=9qlXrkQ6RAGh5F4Z8C5C5eaOqaQQBUjptzoNRoLuTcg=; b=DuF3x/0PG/OFFvS7ijxwZpCsoCSf+qu6fdf3YC+NgLJi+K/tQGY6dgfiUoaOF3Eymm S+nXB1XMdnsERAdF6UxX7GoMUYD+gGzXxXGbp32S+jtoI8xzizG6iECVX1uCmVuDHOv1 05Eq32+R11KpoBLVU//oyPv5wcr+jmZK54k52Uo3q255Opwzf8TlEe8zJyh3j+h11PMN s+OTw4ZbITa48IFEaSk9h4HxCpXbmS0jAYT3aQBTGggCCWlL0+IyUVTH1Vp2zYli8+E5 QjtRUlRHI4XPJW8RhYvG2AzvVqhqiw8JZtoZD2NW8T/9kFeF1ztYI9N7SteF2xWO4wab +4aw== 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=9qlXrkQ6RAGh5F4Z8C5C5eaOqaQQBUjptzoNRoLuTcg=; b=VAre7VikVq8kntj+Fy1p7DKUJvn4NZsxVbst/R7k9wpk4idEauf0PR3+pLQIKQslcf bOf2hnDS2c0/Kfq6g0KIR1T5aC9NitkY4pxnAwlfuZkO+E2SvIKPvyL243CzlIZUPfmA 7xWFVVGoLoW6JuTk9bi9x0WrNSyB2s1kQpLkdj8xDGW3gFPIod/Go9j6YFEkGGQsHbM0 uJJcgROhA4nYTV5piZrmlN6tam2qoS309ogf2lspJJYPVv6AA3hYb/mW4sCbQWXAdWfI w5yczYbGJCP1e51bWK0qKDtc8UR79oEO70WoVB0z1sTcim3sv3TAloGKUFPiXnR4uqHc r6iw== X-Gm-Message-State: AN3rC/5FE9+7hmQQDqIX9+HCoolbBzC/KsN7hRFUKUWQFSxeAJkGm+8V nh/8hQzxQh6TXksFSmBwJLvHHbgAQShV X-Received: by 10.99.232.69 with SMTP id a5mr3916321pgk.167.1493275681607; Wed, 26 Apr 2017 23:48:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.176.206 with HTTP; Wed, 26 Apr 2017 23:48:01 -0700 (PDT) In-Reply-To: References: From: Akshay Joshi Date: Thu, 27 Apr 2017 12:18:01 +0530 Message-ID: Subject: Re: Declarative partitioning in pgAdmin4 To: Shirley Wang Cc: Dave Page , pgadmin-hackers Content-Type: multipart/alternative; boundary=001a114a31ce8df2b5054e2056a6 X-Pg-Spam-Score: -1.9 (-) 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 --001a114a31ce8df2b5054e2056a6 Content-Type: text/plain; charset=UTF-8 On Wed, Apr 26, 2017 at 11:06 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 > - 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. > Sure, it would be great. We will require some R&D about which feature/controls(Inheritance, Constraints, Indexes, Triggers and may be more) works with partitioning and which we will have to disabled if user will create partition table. > > > -- *Akshay Joshi* *Principal Software Engineer * *Phone: +91 20-3058-9517Mobile: +91 976-788-8246* --001a114a31ce8df2b5054e2056a6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Wed, Apr 26, 2017 at 11:06 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 "Ho= w to add Declarative Partitioning" support in pgAdmin4. We thought ins= tead 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 i= t's child nodes (column, index, trigger, etc..) which is more complex a= nd error prone.=C2=A0

Perhaps, = but from the user's perspective, there's no reason to list them sep= arately - they are just tables with a different structure from others. We s= houldn'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 - C= olumns
=C2=A0 =C2=A0 - Constraints
=C2=A0 =C2=A0 - Part= itions
=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<= /div>
<= div>=C2=A0

Below is the design that we can implement:=C2=A0
    Create new "Partition Tables" collection node. User will be able= to create partition table by clicking "Create -> Partition Table&q= uot; 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 t= he dialog? 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&quo= t; menu will be added on each partitioned table node. We will share the dialog prototype later once we will have complete understandi= ng 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.=C2=A0
  • We will have to show su= b nodes like (column, index, trigger, constraints, etc..) on main table whi= le some 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 following:
  • How to remove partitions(table) from exis= ting 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 Declarati= ve partitioning.=C2=A0
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 partiti= oned 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 thi= nking 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 d= oing some research (interviews to discover user needs and pains, creating m= ockups, getting feedback etc) and coming up with some solutions based on us= er feedback.

=C2=A0 =C2= =A0 Sure, it would be great. We will require some R&D about which featu= re/controls(Inheritance, Constraints, Indexes, Triggers and may be more) wo= rks with partitioning and which we will have to disabled if user will creat= e partition table. =C2=A0

=C2=A0



--
Akshay Joshi


<= b>Phone: +91 20-3058-9517
Mobile: +91 976-788= -8246
--001a114a31ce8df2b5054e2056a6--