[fpc-pascal] Database apps on Debian etc.

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Sat Nov 11 19:41:43 CET 2017


Graeme started a short thread on databases in "The Other Place" a few 
days ago, but I thought this might be of sufficient general relevance to 
raise here.

I had a system outage this morning, with all apps suddenly losing their 
connectivity to the PostgreSQL server.

It turned out that the cause of that was that Debian had done an 
unattended upgrade of the Postgres server, and by restarting it had 
killed all persistent connections. There is no "Can we kill your 
database when we feel like it?" question during Debian installation.

I anticipate that the same problem will affect other databases or 
software to which a client program maintains a persistent session, 
unless explicit steps are taken to recognise and recover from a 
server-side restart.

Noting that the traditional way of using the data-aware controls 
introduced by Delphi etc., is particularly vulnerable, and noting that 
the FPC/Lazarus controls do a good job of presenting a common API 
irrespective of what backend server is being used, would it be feasible 
to have a "reconnect monitor" or similar to help recover from this sort 
of thing?

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list