这是indexloc提供的服务,不要输入任何密码
Skip to content

'NoneType' object has no attribute 'pgconn' displayed after successful long query and User stop and start the PostgreSQL service and execute query again #6509

@FaharAbbasRizvi

Description

@FaharAbbasRizvi

If the long query is running and completed successfully and the user stop the PostgreSQL service and start in a few second, then a connection warning is displayed and if the click on continue then 'NoneType' object has no attribute 'pgconn'

To Reproduce

Steps to reproduce the behavior:

Go to query tool Windows and execute following query:

SELECT(
SELECT concat_ws(' ',name_first, name_last) as generated
FROM (
SELECT string_agg(x,'')
FROM (
select start_arr[ 1 + ( (random() * 25)::int) % 16 ]
FROM
(
select '{CO,GE,FOR,SO,CO,GIM,SE,CO,GE,CA,FRA,GEC,GE,GA,FRO,GIP}'::text[] as start_arr
) syllarr,
-- need 3 syllabes, and force generator interpretation with the '0' (else 3 same syllabes)
generate_series(1, 3 + (generator0))
) AS comp3syl(x)
) AS comp_name_1st(name_first),
(
SELECT x[ 1 + ( (random() * 25)::int) % 14 ]
FROM (
select '{Ltd,& Co,SARL,SA,Gmbh,United,Brothers,& Sons,International,Ext,Worldwide,Global,2000,3000}'::text[]
) AS z2(x)
) AS comp_name_last(name_last)
)
FROM generate_series(1,10000000) as generator
2. Wait till the query is executed successfully
3. now execute this command through terminal
launchctl unload /Library/LaunchDaemons/postgresql-15.plist
launchctl load /Library/LaunchDaemons/postgresql-15.plist
4. Now execute the query again
5. Pop up message related to connection warning is displayed
6. If Click on Continue
7. 'NoneType' object has no attribute 'pgconn'

Expected behavior
No unexpected error is displayed in query tool if long query is running and the user stop and start the PostgreSQL service

Error message

If possible, include the full, unedited text of any error messages displayed.

Screenshots
Screen Shot 2023-06-28 at 7 19 56 PM
Screen Shot 2023-06-28 at 7 20 22 PM
Screen Shot 2023-06-28 at 7 20 44 PM
Screen Shot 2023-06-28 at 7 20 54 PM
Screen Shot 2023-06-28 at 7 21 05 PM

Desktop (please complete the following information):

OS: [MAC Desktop]
Version: [e.g. 7.4]
Mode: [e.g Desktop or Server]
Package type: [All]

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions