Re: [pgAdmin4][Patch]: Allow user to cancel long running queries from dashboard

From: Murtuza Zabuawala <murtuza(dot)zabuawala(at)enterprisedb(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin4][Patch]: Allow user to cancel long running queries from dashboard
Date: 2017-07-17 09:37:15
Message-ID: CAKKotZTAz8hBRk=nAC6nJkS7PawmA25ZJP5uUjBCoBkpHk8CRw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Mon, Jul 17, 2017 at 3:01 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:

> Hi
>
> On Thu, Jul 13, 2017 at 2:53 PM, Murtuza Zabuawala <murtuza.zabuawala@
> enterprisedb.com> wrote:
>
>> hiHi,
>>
>> PFA patch to add functionality which will allow super user to cancel long
>> running queries from dashboard.
>> RM#1812
>>
>> *Steps used to test:*
>> 1) Open psql session, Connect to 'test' database on respective server
>> 2) Execute "select pg_sleep(1000);"
>> 3) Open pgAdmin4
>> 4) Connect to respective server
>> 5) Click on Dashboard
>> 6) Check "Sessions" tab under "Server activity" section then look for
>> active sessions for test database.
>> 7) Click on cancel button and cancel the active session
>> 8) Check psql session now, you will see "ERROR: canceling statement due
>> to user request"
>>
>> Some comments:
>
> - The action here is to cancel the active query in the backend, not the
> session - so messages etc. should say things like "Cancel Active Query?"
>
> - The grid should refresh following the cancel operation.
>
> - Can you fix the vertical alignment while you're working on this? The new
> button really makes the poor alignment stand out.
>
> - This should not be superuser only - regular users should be able to
> cancel their own queries.
>
> - On PG10, background workers are also shown in the dashboard. Should we
> prevent attempts to cancel their work (they'll fail anyway I believe).
>
> Thanks!
>
>
Sure, I'll work on these comments & send updated patch.

> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2017-07-17 09:45:21 pgAdmin 4 commit: Stop tool buttons from changing their styling unexpec
Previous Message Dave Page 2017-07-17 09:35:06 Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor