Re: [GENERAL] pg on Debian servers

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: [GENERAL] pg on Debian servers
Дата
Msg-id CABUevEyYFdsAp=X3nmAw4SAeagud2EM0p8UneR60mDayVtW4VQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [GENERAL] pg on Debian servers  (rob stone <floriparob@gmail.com>)
Ответы Re: [GENERAL] pg on Debian servers  (rob stone <floriparob@gmail.com>)
Список pgsql-general


On Sat, Nov 11, 2017 at 2:23 PM, rob stone <floriparob@gmail.com> wrote:


On Sat, 2017-11-11 at 13:03 +0000, Mark Morgan Lloyd wrote:
> Apologies for something which is distro related, but I was bitten by
> a
> "silly mistake"- one of my own, I hasten to say- earlier.
>
> Several legacy programs written in Delphi ground to a halt this
> morning,
> which turned out to be because a Debian system had updated its copy
> of
> PostgreSQL and restarted the server, which broke any live
> connections.
>
> At least some versions of Delphi, not to mention other IDE/RAD tools
> with database-aware components, don't automatically try to
> reestablish a
> database session that's been interrupted. In any event, an
> unexpected
> server restart (irrespective of all investment in UPSes etc.) has
> the
> potential of playing havoc on a clustered system.
>
> Is there any way that either the package maintainer or a site
> administrator/programmer such as myself can mark the Postgres server
> packages as "manual upgrade only" or similar? Or since I'm almost
> certainly not the first person to be bitten by this, is there a
> preferred hack in mitigation?
>
> --
> Mark Morgan Lloyd
> markMLl .AT. telemetry.co .DOT. uk
>
> [Opinions above are the author's, not those of his employers or
> colleagues]
>
>

Hello Mark,

Probably caused by systemd.

Systemd has nothing to do with it, it's Debian standard to restart the services when the binaries have changed, regardless of sysvinit or systemd.
 
You can disable the postgresql service and
re-name the script in init.d. You then have to start postgres via a
shell script.

The init.d script is not used with systemd.

 
You can also mark packages to be on "hold" but I don't know exactly
what happens for major version upgrades as the current version is 9 but
when you run an upgrade via apt it will try to install version 10 which
is no big deal as the binaries will end up in different paths, however

The current version is 10. The previous version was 9.6. Version 9 was more than 5 years ago.

And the apt system will *never* try to upgrade across a major version. You do a new install to get the new version. An upgrade operation will put you at the latest minor release for the currently installed version.

 
libpq will be updated and that may cause a restart. I run upgrades
without any applications running so I don't know exactly what could
happen when using unattended upgrades.

libpq does get upgraded, but it does not cause restarts. A restart of a client application using libpq must be done manually by the administrator (unless there is specific code in the client application or it's packaging to deal with that).


--

В списке pgsql-general по дате отправления:

Предыдущее
От: Christoph Berg
Дата:
Сообщение: Re: [GENERAL] pg on Debian servers
Следующее
От: Clodoaldo Neto
Дата:
Сообщение: [GENERAL] Fedora 25 packages not signed