public inbox for [email protected]  
help / color / mirror / Atom feed
[Patch][pgAdmin4]: RM1519 - Error running VACUUM FULL FREEZE ANALYZE VERBOSE
2+ messages / 2 participants
[nested] [flat]

* [Patch][pgAdmin4]: RM1519 - Error running VACUUM FULL FREEZE ANALYZE VERBOSE
@ 2016-08-04 09:59  Surinder Kumar <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Surinder Kumar @ 2016-08-04 09:59 UTC (permalink / raw)
  To: pgadmin-hackers

Hi

This issue is reproduced to me with following steps.:
1) When the query "VACUUM FULL FREEZE ANALYZE VERBOSE" is run for first
time, it runs without error.
2) then the query "SELECT 1" is executed. no error.
3) But when query in step #1 is run again, it throws an error:
*TypeError: cannot concatenate 'str' and 'NoneType' objects*

4) Now executing query in step #2 throws following error:
*Error Message:execute cannot be used while an asynchronous query is
underway********** Error ***********

*Reason:*
When the query in step #1 is run for second time as in step #3, it fails
due to python error thus loading spinner stops and run query button is
enabled. but the query is still running in background.

then on running query in step #4 throws error with message "asynchronous
query is underway" because last run query is not yet finished.

*Solution:*
This is due to python error.
String type and NoneType is now formatted properly which resolves the issue.

Please find attached patch and review.


Thanks,
Surinder Kumar


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [application/octet-stream] RM1519.patch (569B, 3-RM1519.patch)
  download | inline diff:
diff --git a/web/pgadmin/tools/sqleditor/__init__.py b/web/pgadmin/tools/sqleditor/__init__.py
index 0c3e38d..bb5c26b 100644
--- a/web/pgadmin/tools/sqleditor/__init__.py
+++ b/web/pgadmin/tools/sqleditor/__init__.py
@@ -461,7 +461,7 @@ def poll(trans_id):
             """
             if isinstance(additional_result, list) \
                     and len(additional_result) > 0:
-                result = str(additional_result[-1]) + result
+                result = "{0} {1}".format(additional_result[-1], result)

             rows_affected = conn.rows_affected()



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [Patch][pgAdmin4]: RM1519 - Error running VACUUM FULL FREEZE ANALYZE VERBOSE
@ 2016-08-04 11:14  Dave Page <[email protected]>
  parent: Surinder Kumar <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Dave Page @ 2016-08-04 11:14 UTC (permalink / raw)
  To: Surinder Kumar <[email protected]>; +Cc: pgadmin-hackers

Thanks, applied.

On Thu, Aug 4, 2016 at 10:59 AM, Surinder Kumar
<[email protected]> wrote:
> Hi
>
> This issue is reproduced to me with following steps.:
> 1) When the query "VACUUM FULL FREEZE ANALYZE VERBOSE" is run for first
> time, it runs without error.
> 2) then the query "SELECT 1" is executed. no error.
> 3) But when query in step #1 is run again, it throws an error:
> TypeError: cannot concatenate 'str' and 'NoneType' objects
>
> 4) Now executing query in step #2 throws following error:
> Error Message:execute cannot be used while an asynchronous query is
> underway********** Error **********
>
> Reason:
> When the query in step #1 is run for second time as in step #3, it fails due
> to python error thus loading spinner stops and run query button is enabled.
> but the query is still running in background.
>
> then on running query in step #4 throws error with message "asynchronous
> query is underway" because last run query is not yet finished.
>
> Solution:
> This is due to python error.
> String type and NoneType is now formatted properly which resolves the issue.
>
> Please find attached patch and review.
>
>
> Thanks,
> Surinder Kumar
>
>
> --
> Sent via pgadmin-hackers mailing list ([email protected])
> 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 ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2016-08-04 11:14 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-08-04 09:59 [Patch][pgAdmin4]: RM1519 - Error running VACUUM FULL FREEZE ANALYZE VERBOSE Surinder Kumar <[email protected]>
2016-08-04 11:14 ` Dave Page <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox