Thread: PATCH: Added Statistics functionality for many nodes (pgAdmin4)
Hi,
PFA patch to add Statistics functionality to below nodes,
- Table
- Function
- Procedure
- Trigger Function
- Sequence
- Index
- Column
- Primary Key
- Unique constraint
- Exclusion constraint
(RM#1299)
---------------
Additionally, attaching two separate patches,
1) To update validation of object before using it
(file: statistics.js)
2) To fix incorrect condition checking for privileges.
Thanks to Surinder for reporting this issue.
(file: privilege.js)
Please review.
--
Regards,
Attachment
Thanks. I've pushed this with changes to reformat some of the SQL, and ensure the column headers are properly cased. There is one outstanding bug though - if an object is selected for which the stats query doesn't return any rows (e.g. track_functions = false), then weird things happen - you get an empty error message, or the previous stats might be re-shown. Please fix the patch so that in such cases the pgAdmin 3 behaviour is followed, i.e. the table header is shown, but no rows (bug #1316). Also, please look at #1315 which you're at it :-) Thanks again. On Tue, Jun 7, 2016 at 12:27 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote: > Hi, > > PFA patch to add Statistics functionality to below nodes, > > Table > Function > Procedure > Trigger Function > Sequence > Index > Column > Primary Key > Unique constraint > Exclusion constraint > > (RM#1299) > > --------------- > > Additionally, attaching two separate patches, > > 1) To update validation of object before using it > (file: statistics.js) > > 2) To fix incorrect condition checking for privileges. > Thanks to Surinder for reporting this issue. > (file: privilege.js) > > > Please review. > > > -- > Regards, > Murtuza Zabuawala > EnterpriseDB: 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 > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Hi Dave,
Can you please share steps to re-produce RM#1316, I’m not able to re-produce it on my side.
Meanwhile, PFA patch for RM#1315 :-)
Regards,
Murtuza
On 07-Jun-2016, at 5:52 pm, Dave Page <dpage@pgadmin.org> wrote:
Thanks. I've pushed this with changes to reformat some of the SQL, and
ensure the column headers are properly cased.
There is one outstanding bug though - if an object is selected for
which the stats query doesn't return any rows (e.g. track_functions =
false), then weird things happen - you get an empty error message, or
the previous stats might be re-shown. Please fix the patch so that in
such cases the pgAdmin 3 behaviour is followed, i.e. the table header
is shown, but no rows (bug #1316).
Also, please look at #1315 which you're at it :-)
Thanks again.
On Tue, Jun 7, 2016 at 12:27 PM, Murtuza Zabuawala
<murtuza.zabuawala@enterprisedb.com> wrote:Hi,
PFA patch to add Statistics functionality to below nodes,
Table
Function
Procedure
Trigger Function
Sequence
Index
Column
Primary Key
Unique constraint
Exclusion constraint
(RM#1299)
---------------
Additionally, attaching two separate patches,
1) To update validation of object before using it
(file: statistics.js)
2) To fix incorrect condition checking for privileges.
Thanks to Surinder for reporting this issue.
(file: privilege.js)
Please review.
--
Regards,
Murtuza Zabuawala
EnterpriseDB: 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
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment
On Wed, Jun 8, 2016 at 11:24 AM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi Dave,Can you please share steps to re-produce RM#1316, I’m not able to re-produce it on my side.
Please set 'track_functions' to false in postgresql.conf.
And, then open pgAdmin 4, browse through any function.
--
Thanks & Regards,
Ashesh Vashi
Meanwhile, PFA patch for RM#1315 :-)Regards,MurtuzaOn 07-Jun-2016, at 5:52 pm, Dave Page <dpage@pgadmin.org> wrote:
Thanks. I've pushed this with changes to reformat some of the SQL, and
ensure the column headers are properly cased.
There is one outstanding bug though - if an object is selected for
which the stats query doesn't return any rows (e.g. track_functions =
false), then weird things happen - you get an empty error message, or
the previous stats might be re-shown. Please fix the patch so that in
such cases the pgAdmin 3 behaviour is followed, i.e. the table header
is shown, but no rows (bug #1316).
Also, please look at #1315 which you're at it :-)
Thanks again.
On Tue, Jun 7, 2016 at 12:27 PM, Murtuza Zabuawala
<murtuza.zabuawala@enterprisedb.com> wrote:Hi,
PFA patch to add Statistics functionality to below nodes,
Table
Function
Procedure
Trigger Function
Sequence
Index
Column
Primary Key
Unique constraint
Exclusion constraint
(RM#1299)
---------------
Additionally, attaching two separate patches,
1) To update validation of object before using it
(file: statistics.js)
2) To fix incorrect condition checking for privileges.
Thanks to Surinder for reporting this issue.
(file: privilege.js)
Please review.
--
Regards,
Murtuza Zabuawala
EnterpriseDB: 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
--
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
On Wed, Jun 8, 2016 at 6:54 AM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote: > Hi Dave, > > Can you please share steps to re-produce RM#1316, I’m not able to re-produce > it on my side. Please see Ashesh's response. > Meanwhile, PFA patch for RM#1315 :-) Thanks, pushed. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Hi Ashesh/Dave,
I tried setting 'track_functions' to false in postgresql.conf. but then I am not able to start server got error saying false is not correct argument (Version: PG 9.5).
Then I also set it to all and try running function & check the stats.
I am getting proper output in both cases, with stats & without stats(PFA screenshot)
Let me know if I missed anything here.
--
Regards,
On Wed, Jun 8, 2016 at 11:46 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
On Wed, Jun 8, 2016 at 11:24 AM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi Dave,Can you please share steps to re-produce RM#1316, I’m not able to re-produce it on my side.Please set 'track_functions' to false in postgresql.conf.And, then open pgAdmin 4, browse through any function.--Thanks & Regards,Ashesh VashiMeanwhile, PFA patch for RM#1315 :-)Regards,MurtuzaOn 07-Jun-2016, at 5:52 pm, Dave Page <dpage@pgadmin.org> wrote:
Thanks. I've pushed this with changes to reformat some of the SQL, and
ensure the column headers are properly cased.
There is one outstanding bug though - if an object is selected for
which the stats query doesn't return any rows (e.g. track_functions =
false), then weird things happen - you get an empty error message, or
the previous stats might be re-shown. Please fix the patch so that in
such cases the pgAdmin 3 behaviour is followed, i.e. the table header
is shown, but no rows (bug #1316).
Also, please look at #1315 which you're at it :-)
Thanks again.
On Tue, Jun 7, 2016 at 12:27 PM, Murtuza Zabuawala
<murtuza.zabuawala@enterprisedb.com> wrote:Hi,
PFA patch to add Statistics functionality to below nodes,
Table
Function
Procedure
Trigger Function
Sequence
Index
Column
Primary Key
Unique constraint
Exclusion constraint
(RM#1299)
---------------
Additionally, attaching two separate patches,
1) To update validation of object before using it
(file: statistics.js)
2) To fix incorrect condition checking for privileges.
Thanks to Surinder for reporting this issue.
(file: privilege.js)
Please review.
--
Regards,
Murtuza Zabuawala
EnterpriseDB: 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
--
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
Attachment
On Thu, Jun 9, 2016 at 9:21 AM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote: > Hi Ashesh/Dave, > > I tried setting 'track_functions' to false in postgresql.conf. but then I am > not able to start server got error saying false is not correct argument > (Version: PG 9.5). > Then I also set it to all and try running function & check the stats. > > I am getting proper output in both cases, with stats & without stats(PFA > screenshot) > > Let me know if I missed anything here. You might need to reset the server stats (or re-initdb to be sure everything is fresh and clean). FYI, I saw this on PostgreSQL 9.4. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Hi Dave, I tried with fresh install of 9.4 version but still not able to re-produce the issue, I also tried switching python version2.7/3.5 but still no luck. I also checked with Neel & Surinder on their system but still not able to re-produce the issue. Regards, Murtuza > On 10-Jun-2016, at 8:56 pm, Dave Page <dpage@pgadmin.org> wrote: > > On Thu, Jun 9, 2016 at 9:21 AM, Murtuza Zabuawala > <murtuza.zabuawala@enterprisedb.com> wrote: >> Hi Ashesh/Dave, >> >> I tried setting 'track_functions' to false in postgresql.conf. but then I am >> not able to start server got error saying false is not correct argument >> (Version: PG 9.5). >> Then I also set it to all and try running function & check the stats. >> >> I am getting proper output in both cases, with stats & without stats(PFA >> screenshot) >> >> Let me know if I missed anything here. > > You might need to reset the server stats (or re-initdb to be sure > everything is fresh and clean). FYI, I saw this on PostgreSQL 9.4. > > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company
Hi On Mon, Jun 13, 2016 at 12:18 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote: > Hi Dave, > > I tried with fresh install of 9.4 version but still not able to re-produce the issue, I also tried switching python version2.7/3.5 but still no luck. > I also checked with Neel & Surinder on their system but still not able to re-produce the issue. What can't you reproduce - the queries returning zero rows, or the strange effects that leads to? -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
The strange effects that leads to. > On 13-Jun-2016, at 4:55 pm, Dave Page <dpage@pgadmin.org> wrote: > > Hi > > On Mon, Jun 13, 2016 at 12:18 PM, Murtuza Zabuawala > <murtuza.zabuawala@enterprisedb.com> wrote: >> Hi Dave, >> >> I tried with fresh install of 9.4 version but still not able to re-produce the issue, I also tried switching python version2.7/3.5 but still no luck. >> I also checked with Neel & Surinder on their system but still not able to re-produce the issue. > > What can't you reproduce - the queries returning zero rows, or the > strange effects that leads to? > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company
On Mon, Jun 13, 2016 at 12:29 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote: > The strange effects that leads to. > > >> On 13-Jun-2016, at 4:55 pm, Dave Page <dpage@pgadmin.org> wrote: >> >> Hi >> >> On Mon, Jun 13, 2016 at 12:18 PM, Murtuza Zabuawala >> <murtuza.zabuawala@enterprisedb.com> wrote: >>> Hi Dave, >>> >>> I tried with fresh install of 9.4 version but still not able to re-produce the issue, I also tried switching python version2.7/3.5 but still no luck. >>> I also checked with Neel & Surinder on their system but still not able to re-produce the issue. >> >> What can't you reproduce - the queries returning zero rows, or the >> strange effects that leads to? Hmm, neither can I now. I wonder if something didn't refresh correctly... I do notice that we don't return stats for the Sequences, Trigger functions or Functions nodes though. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Hi Dave, I copied pgAdmin3 behaviour, I’ll implement it in pgAdmin4 :) Thanks, Murtuza > On 13-Jun-2016, at 5:51 pm, Dave Page <dpage@pgadmin.org> wrote: > > On Mon, Jun 13, 2016 at 12:29 PM, Murtuza Zabuawala > <murtuza.zabuawala@enterprisedb.com> wrote: >> The strange effects that leads to. >> >> >>> On 13-Jun-2016, at 4:55 pm, Dave Page <dpage@pgadmin.org> wrote: >>> >>> Hi >>> >>> On Mon, Jun 13, 2016 at 12:18 PM, Murtuza Zabuawala >>> <murtuza.zabuawala@enterprisedb.com> wrote: >>>> Hi Dave, >>>> >>>> I tried with fresh install of 9.4 version but still not able to re-produce the issue, I also tried switching pythonversion 2.7/3.5 but still no luck. >>>> I also checked with Neel & Surinder on their system but still not able to re-produce the issue. >>> >>> What can't you reproduce - the queries returning zero rows, or the >>> strange effects that leads to? > > Hmm, neither can I now. I wonder if something didn't refresh correctly... > > I do notice that we don't return stats for the Sequences, Trigger > functions or Functions nodes though. > > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company
Hi,
PFA patch to add stats on Sequences/Function/Trigger functions collection nodes.
Please review.
Regards,
Murtuza
--
Regards,
On Tue, Jun 14, 2016 at 1:49 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi Dave,
I copied pgAdmin3 behaviour, I’ll implement it in pgAdmin4 :)
Thanks,
Murtuza
> On 13-Jun-2016, at 5:51 pm, Dave Page <dpage@pgadmin.org> wrote:
>
> On Mon, Jun 13, 2016 at 12:29 PM, Murtuza Zabuawala
> <murtuza.zabuawala@enterprisedb.com> wrote:
>> The strange effects that leads to.
>>
>>
>>> On 13-Jun-2016, at 4:55 pm, Dave Page <dpage@pgadmin.org> wrote:
>>>
>>> Hi
>>>
>>> On Mon, Jun 13, 2016 at 12:18 PM, Murtuza Zabuawala
>>> <murtuza.zabuawala@enterprisedb.com> wrote:
>>>> Hi Dave,
>>>>
>>>> I tried with fresh install of 9.4 version but still not able to re-produce the issue, I also tried switching python version 2.7/3.5 but still no luck.
>>>> I also checked with Neel & Surinder on their system but still not able to re-produce the issue.
>>>
>>> What can't you reproduce - the queries returning zero rows, or the
>>> strange effects that leads to?
>
> Hmm, neither can I now. I wonder if something didn't refresh correctly...
>
> I do notice that we don't return stats for the Sequences, Trigger
> functions or Functions nodes though.
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
Attachment
Thanks, applied. On Wed, Jun 15, 2016 at 8:06 AM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote: > Hi, > > PFA patch to add stats on Sequences/Function/Trigger functions collection > nodes. > Please review. > > > Regards, > Murtuza > > -- > Regards, > Murtuza Zabuawala > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > On Tue, Jun 14, 2016 at 1:49 PM, Murtuza Zabuawala > <murtuza.zabuawala@enterprisedb.com> wrote: >> >> Hi Dave, >> >> I copied pgAdmin3 behaviour, I’ll implement it in pgAdmin4 :) >> >> Thanks, >> Murtuza >> >> > On 13-Jun-2016, at 5:51 pm, Dave Page <dpage@pgadmin.org> wrote: >> > >> > On Mon, Jun 13, 2016 at 12:29 PM, Murtuza Zabuawala >> > <murtuza.zabuawala@enterprisedb.com> wrote: >> >> The strange effects that leads to. >> >> >> >> >> >>> On 13-Jun-2016, at 4:55 pm, Dave Page <dpage@pgadmin.org> wrote: >> >>> >> >>> Hi >> >>> >> >>> On Mon, Jun 13, 2016 at 12:18 PM, Murtuza Zabuawala >> >>> <murtuza.zabuawala@enterprisedb.com> wrote: >> >>>> Hi Dave, >> >>>> >> >>>> I tried with fresh install of 9.4 version but still not able to >> >>>> re-produce the issue, I also tried switching python version 2.7/3.5 but >> >>>> still no luck. >> >>>> I also checked with Neel & Surinder on their system but still not >> >>>> able to re-produce the issue. >> >>> >> >>> What can't you reproduce - the queries returning zero rows, or the >> >>> strange effects that leads to? >> > >> > Hmm, neither can I now. I wonder if something didn't refresh >> > correctly... >> > >> > I do notice that we don't return stats for the Sequences, Trigger >> > functions or Functions nodes though. >> > >> > >> > -- >> > 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