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





Desktop (please complete the following information):
OS: [MAC Desktop]
Version: [e.g. 7.4]
Mode: [e.g Desktop or Server]
Package type: [All]