Thread: [pgAdmin4][Patch]: RM1569 - Right-clicking an disconnected EPAS server shows "Create Resource Group" option
[pgAdmin4][Patch]: RM1569 - Right-clicking an disconnected EPAS server shows "Create Resource Group" option
From
Surinder Kumar
Date:
Hi
Issue:
Two reasons:
1) In Resource group menu, the check for server connected or not is missing.
2) When server is disconnected, server type is always set to 'pg' which is wrong and thus function always returns true.
Solution:
If server is disconnected, we should check server type based on its maintenance db.
If maintenance db is 'edb' its ppas server, otherwise 'pg'.
Please review attached patch.
Thanks,
Surinder Kumar
Attachment
Re: [pgAdmin4][Patch]: RM1569 - Right-clicking an disconnected EPAS server shows "Create Resource Group" option
From
Dave Page
Date:
Hi
That's not a reliable check - you can just as easily use postgres as the maintenance db on epas.
Why don't we just hide the option if disconnected, and if connected, then check the server type?
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK:http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK:http://www.enterprisedb.com
The Enterprise PostgreSQL Company
HiIssue:Two reasons:1) In Resource group menu, the check for server connected or not is missing.2) When server is disconnected, server type is always set to 'pg' which is wrong and thus function always returns true.Solution:If server is disconnected, we should check server type based on its maintenance db.If maintenance db is 'edb' its ppas server, otherwise 'pg'.Please review attached patch.Thanks,Surinder Kumar
<RM1569.patch>
--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Re: [pgAdmin4][Patch]: RM1569 - Right-clicking an disconnected EPAS server shows "Create Resource Group" option
From
Surinder Kumar
Date:
On Sat, Aug 20, 2016 at 1:39 AM, Dave Page <dpage@pgadmin.org> wrote:
HiThat's not a reliable check - you can just as easily use postgres as the maintenance db on epas.
Yes, somehow i missed it.
Why don't we just hide the option if disconnected, and if connected, then check the server type?
The issue is that we are not getting 'server_type' in response after connect/disconnect of server. that's why checks gets failed. it always shows server type as 'pg'.
now it has been taken care in the updated patch.
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK:http://www.enterprisedb.com
The Enterprise PostgreSQL CompanyHiIssue:Two reasons:1) In Resource group menu, the check for server connected or not is missing.2) When server is disconnected, server type is always set to 'pg' which is wrong and thus function always returns true.Solution:If server is disconnected, we should check server type based on its maintenance db.If maintenance db is 'edb' its ppas server, otherwise 'pg'.Please review attached patch.Thanks,Surinder Kumar<RM1569.patch>
--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachment
Re: [pgAdmin4][Patch]: RM1569 - Right-clicking an disconnected EPAS server shows "Create Resource Group" option
From
Dave Page
Date:
Thanks, applied. On Fri, Aug 19, 2016 at 10:14 PM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote: > On Sat, Aug 20, 2016 at 1:39 AM, Dave Page <dpage@pgadmin.org> wrote: >> >> Hi >> >> That's not a reliable check - you can just as easily use postgres as the >> maintenance db on epas. > > Yes, somehow i missed it. >> >> >> Why don't we just hide the option if disconnected, and if connected, then >> check the server type? > > The issue is that we are not getting 'server_type' in response after > connect/disconnect of server. that's why checks gets failed. it always shows > server type as 'pg'. > now it has been taken care in the updated patch. > >> >> -- >> Dave Page >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake >> >> EnterpriseDB UK:http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> >> On 19 Aug 2016, at 19:00, Surinder Kumar <surinder.kumar@enterprisedb.com> >> wrote: >> >> Hi >> >> Issue: >> Two reasons: >> 1) In Resource group menu, the check for server connected or not is >> missing. >> 2) When server is disconnected, server type is always set to 'pg' which is >> wrong and thus function always returns true. >> >> Solution: >> If server is disconnected, we should check server type based on its >> maintenance db. >> If maintenance db is 'edb' its ppas server, otherwise 'pg'. >> >> Please review attached patch. >> >> Thanks, >> Surinder Kumar >> >> <RM1569.patch> >> >> >> -- >> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) >> To make changes to your subscription: >> http://www.postgresql.org/mailpref/pgadmin-hackers > > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company