Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRgfm-0007eC-Ry for pgadmin-hackers@arkaria.postgresql.org; Thu, 12 Jan 2017 14:48:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cRgfm-0007Xb-Bh for pgadmin-hackers@arkaria.postgresql.org; Thu, 12 Jan 2017 14:48:14 +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 1cRgfl-0007XT-DA for pgadmin-hackers@postgresql.org; Thu, 12 Jan 2017 14:48:13 +0000 Received: from mail-yb0-x230.google.com ([2607:f8b0:4002:c09::230]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cRgfg-00058G-1k for pgadmin-hackers@postgresql.org; Thu, 12 Jan 2017 14:48:11 +0000 Received: by mail-yb0-x230.google.com with SMTP id c125so6218265ybf.1 for ; Thu, 12 Jan 2017 06:48:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pivotal-io.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=gbia8BV5jgqGTqKaMv0UkqvXnqgwcv+rx/TTv1Rre/4=; b=aC7mKOf30ObBqFRF5+GwahnZvmwWAdi0CnOS2A7N7YriScAFQMZp0bVOMkhRy0NhN7 FMqYVQ8NAGBdFc7jZ7vb9cM4+XxOd+TPm3czA8RPX27guWHGgn0BYRPJJAdpnGVQ1Rcj AdUJE/8vb9h+xOwEl8+aV10qOD4EBJeghntVeSnBz/Tlpe3H3J74qaFjOLp+1ZR9Jzvd 017AO/wbo54mQ3v/Hyqnf5NQ6TJb0n8oWt4ymnoHbbrpfco1b1zpUBjjX1mXnJpSwLOz 1M7cc6ZLrJBC62y406Me9fDARAn3nAUFhhQLPj3kao3mmtDkUKin6Yz3d0zNGMNo47JM bVxA== 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=gbia8BV5jgqGTqKaMv0UkqvXnqgwcv+rx/TTv1Rre/4=; b=o0KV6UTKJWw7j6YmqvwxUJ7s+CJ9yAEONmWAMoWbwGQ8FK4rYWwLcPFU0A2nij8lRT qjwxStmgZfdZzWBVjtszapx/Zl48dcYkBaGAf4SbxcYeEX0LTiqVYS4ULrA7PcP6a14I 2Gg9aC4n/XlzI+KjZ6jf8QKgPcwhB/9nHVslfCunIx+wBsoss7BBwW3chR3xtAA0IYg+ 0kyyghLmL8pvfhB6n6Z0dafYHF2WRvkqhcy6V58opef3opy3i/d4Q6h0/WUKKeVSvWdK pS0LyrUAsVBbSY7IYwdnMAxleaWhdDjAUQOfpMqUOjoy/DwcBqw+jVrs/oOnJj20OGtD z4xA== X-Gm-Message-State: AIkVDXKNi87ThZGV3f18nUMx1Kfxnpf+J7PTrF1G+T6hTBVdlo8/kt9d06VtEcFSID6nZ/xdQO8P1RU1YwutZtqh X-Received: by 10.37.104.193 with SMTP id d184mr8736490ybc.148.1484232485729; Thu, 12 Jan 2017 06:48:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.170.171 with HTTP; Thu, 12 Jan 2017 06:48:05 -0800 (PST) In-Reply-To: References: From: George Gelashvili Date: Thu, 12 Jan 2017 09:48:05 -0500 Message-ID: Subject: Re: Driver Module To: Robert Eckhardt Cc: Dave Page , "pgadmin-hackers@postgresql.org" , "plumadmin@pivotal.io" , Ashesh Vashi Content-Type: multipart/alternative; boundary=f403045c03b213e8840545e6ce35 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 --f403045c03b213e8840545e6ce35 Content-Type: text/plain; charset=UTF-8 Hi Dave, We looked through the places where there is existing version checking and there isn't a ton of it. Our current plan for supporting Greenplum in pgAdmin4 was not necessarily to support all the features of pgAdmin4, but to at least get the core functionality working. I'm not too concerned about there being a ton of switches, because I don't think most features will need to be disabled. We will also likely make changes to Greenplum to support certain features like query plans rather than doing all the changes on the pgAdmin4 side. What I would like to see though is version checking that happens in one place and is not tied exclusively to either flavor or version, but to a combination of the two. E.g. Greenplum 5.0 might support a feature that is not supported in 8.3 postgres. Tira & George On Wed, Jan 11, 2017 at 11:24 PM, Robert Eckhardt wrote: > > > On Wed, Jan 11, 2017 at 8:07 PM, Dave Page wrote: > >> Hi >> >> On Wed, Jan 11, 2017 at 10:24 PM, George Gelashvili >> wrote: >> > Hi Dave, >> > >> > Thanks for the pointer. >> > We realized that many of the changes we would need to make for >> supporting >> > Greenplum would need to go where there is pg version checking >> throughout the >> > code. This is because unlike PPAS which mostly adds additional features, >> > Greenplum is based on postgres 8.3. >> >> Isn't Heikki fixing that for your next release? >> > > The current release is 8.2, we aren't trying to make that work with > pgAdmin4. Heikki did a yeomans work and the next release will be based on > 8.3. Future releases should be more than one Postgres version at a time but > there was a lot of cleanup to do before we could start the Postgres > merging. > > >> >> > It looks like much of the version checking logic is repeated at points >> where >> > the features are differentiated by postgres version. >> > >> > It might make sense at this point to refactor the way that feature >> flagging >> > is done to be a little bit more unified between server types and >> postgres >> > versions so that we could for example have logic along the lines of: >> > >> > feature_enablement = FeatureEnablement(postgres_flavor, >> postgres_version) >> > >> > #... >> > >> > if(feature_enablement.check_internal_triggers ): >> > # feature call here >> > >> > and then in a feature enablement class, reference the various versions >> and >> > flavors of postgres. >> > >> > Any thoughts on this? >> >> I worry that the list of features would end up being huge - we're not >> just talking about basic things like whether DDL triggers are >> supported, but the catalog schema (e.g. procpid vs. pid in >> pg_stat_activity) and small things like whether a particular GUC can >> be set on a tablespace. >> >> Ultimately, you have to do a version check at some point though >> (unless you're proposing to do something similar to probing the DOM in >> a browser at runtime). Doesn't GP's version string contain additional >> info beyond '8.3'? In pgAdmin 3 we had a EdbMinimumVersion(int major, >> int minor) function in the connection class that basically did: >> >> return isEdb && BackendMinimumVersion(x, y); >> >> Something like that could check other elements of the GP version number. >> > > Greenplum is about to start leveraging semantic versioning. The version > number for the next release will be 5.0.0. > > >> >> -- >> Dave Page >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake >> >> EnterpriseDB UK: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> >> >> -- >> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) >> To make changes to your subscription: >> http://www.postgresql.org/mailpref/pgadmin-hackers >> > > --f403045c03b213e8840545e6ce35 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Dave,

We looked through the pl= aces where there is existing version checking and there isn't a ton of = it. Our current plan for supporting Greenplum in pgAdmin4 was not necessari= ly to support all the features of pgAdmin4, but to at least get the core fu= nctionality working.
I'm not too concerned about there being a ton = of switches, because I don't think most features will need to be disabl= ed. We will also likely make changes to Greenplum to support certain featur= es like query plans rather than doing all the changes on the pgAdmin4 side.=

What I would like to see though is version checking tha= t happens in one place and is not tied exclusively to either flavor or vers= ion, but to a combination of the two. E.g. Greenplum 5.0 might support a fe= ature that is not supported in 8.3 postgres.

Tira & G= eorge

= On Wed, Jan 11, 2017 at 11:24 PM, Robert Eckhardt <reckhardt@pivotal.io= > wrote:
<= br>

On Wed, Jan 11, 2017 at 8:07 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Wed, Jan 11, 2017 at 10:24 PM, George Gelashvili
<ggelashvili= @pivotal.io> wrote:
> Hi Dave,
>
> Thanks for the pointer.
> We realized that many of the changes we would need to make for support= ing
> Greenplum would need to go where there is pg version checking througho= ut the
> code. This is because unlike PPAS which mostly adds additional feature= s,
> Greenplum is based on postgres 8.3.

Isn't Heikki fixing that for your next release?
=

The current release is 8.2, we aren't trying= to make that work with pgAdmin4. Heikki did a yeomans work and the next re= lease will be based on 8.3. Future releases should be more than one Postgre= s version at a time but there was a lot of cleanup to do before we could st= art the Postgres merging.=C2=A0
=C2=A0

> It looks like much of the version checking logic is repeated at points= where
> the features are differentiated by postgres version.
>
> It might make sense at this point to refactor the way that feature fla= gging
> is done to be a little bit more unified between server types and postg= res
> versions so that we could for example have logic along the lines of: >
> feature_enablement =3D FeatureEnablement(postgres_flavor, postgre= s_version)
>
> #...
>
> if(feature_enablement.check_internal_triggers ):
>=C2=A0 =C2=A0# feature call here
>
> and then in a feature enablement class, reference the various versions= and
> flavors of postgres.
>
> Any thoughts on this?

I worry that the list of features would end up being huge - we'r= e not
just talking about basic things like whether DDL triggers are
supported, but the catalog schema (e.g. procpid vs. pid in
pg_stat_activity) and small things like whether a particular GUC can
be set on a tablespace.

Ultimately, you have to do a version check at some point though
(unless you're proposing to do something similar to probing the DOM in<= br> a browser at runtime). Doesn't GP's version string contain addition= al
info beyond '8.3'? In pgAdmin 3 we had a EdbMinimumVersion(int majo= r,
int minor) function in the connection class that basically did:

return isEdb && BackendMinimumVersion(x, y);

Something like that could check other elements of the GP version number.

Greenplum is about to start levera= ging semantic versioning. The version number for the next release will be 5= .0.0.=C2=A0
=C2=A0

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

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-ha= ckers


--f403045c03b213e8840545e6ce35--