[Lazarus] Is there a way to reconnect to postgresql if the connection fails?

Luca Olivetti luca at wetron.es
Wed Aug 24 13:30:31 CEST 2022


El 24/8/22 a les 13:15, Luca Olivetti via lazarus ha escrit:
> El 24/8/22 a les 12:50, Michael Van Canneyt ha escrit:
> 
>>>>>
>>>>> https://bugs.freepascal.org/view.php?id=33737
>>>
>>> I added a couple of comments to that bug (that I cannot reopen).
>>
>> I reopened it. If you can implement a patch that checks forcedClosed for
>> postgres, I will be glad to check & apply it...
> 
> 
> As you can see from the bug report, I tried, I failed, I gave up :-(
> I'll use the nuclear option that I used 4 years ago, i.e. brutally close 
> the app if the connection to the database is severed, then a watchdog 
> app will restart it.
> In this case the client app and the postgresql server will run in the 
> same pc so it shouldn't be a big issue (crossing fingers).

Wait, it seems it's a simple fix. I'll attach a patch later if I see it 
works.

Bye

-- 
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007


More information about the lazarus mailing list