Re: [pgAdmin][RM5398] Bad display of tables storage parameters in the "SQL" tab

From: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
To: Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin][RM5398] Bad display of tables storage parameters in the "SQL" tab
Date: 2020-05-08 09:04:13
Message-ID: CANxoLDfxFuxsFOEOPSikV9Wb-6HRpQmd1Tmmrb3nQJ1BPt+Znw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Thanks, patch applied.

On Fri, May 8, 2020 at 12:56 PM Aditya Toshniwal <
aditya(dot)toshniwal(at)enterprisedb(dot)com> wrote:

> Hi Hackers,
>
> Attached is the updated patch. I've managed to keep the "Save" button
> disabled if custom autovacuum is enabled but no options are set.
> Changes also include materialized view dialog. I've also added the
> "storage settings" param in the properties tab for an mview which was
> missing.
> One more fix was, storage settings props for a table was showing settings
> as toast_*, which should be toast.*.
>
> Test cases, documents, screenshots updated.
> Please review.
>
>
> On Wed, May 6, 2020 at 3:35 PM Aditya Toshniwal <
> aditya(dot)toshniwal(at)enterprisedb(dot)com> wrote:
>
>> Hi,
>>
>> On Wed, May 6, 2020 at 3:29 PM Akshay Joshi <
>> akshay(dot)joshi(at)enterprisedb(dot)com> wrote:
>>
>>>
>>>
>>> On Wed, May 6, 2020 at 3:02 PM Aditya Toshniwal <
>>> aditya(dot)toshniwal(at)enterprisedb(dot)com> wrote:
>>>
>>>> Hi Akshay,
>>>>
>>>> On Wed, May 6, 2020 at 2:43 PM Akshay Joshi <
>>>> akshay(dot)joshi(at)enterprisedb(dot)com> wrote:
>>>>
>>>>> Hi Aditya
>>>>>
>>>>> RESQL test cases are failing for all database server and one minor
>>>>> issue I found:
>>>>>
>>>>
>>>>> - open the properties dialog for any existing table and set the
>>>>> "Custom auto-vacuum?" to Yes.
>>>>> - Save button gets enabled and when clicking on it we get "can't
>>>>> execute an empty query" error.
>>>>>
>>>>> I'm aware of the behaviour. Custom auto-vacuum do not affect SQL
>>>> directly. Once you change the switch there is a change in the model, which
>>>> enables the Save button. Along with custom auto-vacuum there are has
>>>> to be some other option. So there is a change in model which does not
>>>> change SQL. What solution do you suggest ?
>>>>
>>>
>>> Can we add validation in the JS file as if only "Custom
>>> auto-vacuum?" is changed then ask for parameter value to be set or
>>> "Autovacuum Enabled?" should be changed?
>>>
>> I'll check if can put some validation.
>>
>>>
>>>>> Please fix the above and send the patch again.
>>>>>
>>>>> On Tue, May 5, 2020 at 12:07 PM Aditya Toshniwal <
>>>>> aditya(dot)toshniwal(at)enterprisedb(dot)com> wrote:
>>>>>
>>>>>> Hi Hackers,
>>>>>>
>>>>>> Attached is the patch to:
>>>>>> 1) Fix the SQL generated for autovacuum options. It was not
>>>>>> displaying the vacuum options until autovacuum_enabled is set to true.
>>>>>> Vacuum options setting does not depend on autovacuum_enabled, and this was
>>>>>> being wrongly interpreted by pgAdmin.
>>>>>> 2) pgAdmin allows only true or false values for autovacuum_enabled,
>>>>>> and there is no way to reset it individually without disabling custom
>>>>>> autovacuum. To fix this, the control is changed from switch to three state
>>>>>> buttons. Screenshot below:
>>>>>> [image: Screenshot 2020-05-05 at 11.44.11 AM.png]
>>>>>> 3) Setting any vacuum options to zero made the option disappear from
>>>>>> the SQL.
>>>>>> 4) Right click on a table with vacuum options set and create a new
>>>>>> table. The parameters tab will have the options prefilled. This is fixed.
>>>>>> 5) Changed the UI a bit to remove unnecessary space around.
>>>>>> Added "Autovacuum" before enabled.
>>>>>> 6) The SQL generated was appending a ".0" to decimal vacuum options.
>>>>>> Changed to remove the leading ".0".
>>>>>> 7) Test cases updated to increase the scenarios.
>>>>>> 8) Documentation update.
>>>>>>
>>>>>> Please review.
>>>>>>
>>>>>> --
>>>>>> Thanks and Regards,
>>>>>> Aditya Toshniwal
>>>>>> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
>>>>>> "Don't Complain about Heat, Plant a TREE"
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Thanks & Regards*
>>>>> *Akshay Joshi*
>>>>>
>>>>> *Sr. Software Architect*
>>>>> *EnterpriseDB Software India Private Limited*
>>>>> *Mobile: +91 976-788-8246*
>>>>>
>>>>
>>>>
>>>> --
>>>> Thanks and Regards,
>>>> Aditya Toshniwal
>>>> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
>>>> "Don't Complain about Heat, Plant a TREE"
>>>>
>>>
>>>
>>> --
>>> *Thanks & Regards*
>>> *Akshay Joshi*
>>>
>>> *Sr. Software Architect*
>>> *EnterpriseDB Software India Private Limited*
>>> *Mobile: +91 976-788-8246*
>>>
>>
>>
>> --
>> Thanks and Regards,
>> Aditya Toshniwal
>> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
>> "Don't Complain about Heat, Plant a TREE"
>>
>
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
> "Don't Complain about Heat, Plant a TREE"
>

--
*Thanks & Regards*
*Akshay Joshi*

*Sr. Software Architect*
*EnterpriseDB Software India Private Limited*
*Mobile: +91 976-788-8246*

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Akshay Joshi 2020-05-08 09:05:14 Re: [pgAdmin 4 - Housekeeping #5255] Implement Selenium Grid using multi-threading & solenoid using current test framework
Previous Message Akshay Joshi 2020-05-08 09:01:54 pgAdmin 4 commit: Fixed generated SQL issue for auto vacuum options. Fi