Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDVns-0005RY-Hw for pgsql-general@arkaria.postgresql.org; Sat, 11 Nov 2017 13:26:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1eDVnr-0006pD-AO for pgsql-general@arkaria.postgresql.org; Sat, 11 Nov 2017 13:26:31 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eDVlI-0006FV-Us for pgsql-general@postgresql.org; Sat, 11 Nov 2017 13:23:53 +0000 Received: from mail-qt0-x22d.google.com ([2607:f8b0:400d:c0d::22d]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eDVlG-0002Sz-Hw for pgsql-general@postgresql.org; Sat, 11 Nov 2017 13:23:51 +0000 Received: by mail-qt0-x22d.google.com with SMTP id 8so14932481qtv.1 for ; Sat, 11 Nov 2017 05:23:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:date:in-reply-to:references:mime-version :content-transfer-encoding; bh=lnwYgCTBbPjPzlA/mQRgPbXLK3zWwD69ZZNdNX1+ojI=; b=IRwQZf+Yhf2td5TzEwwRWpIMSXRyf6LZL738aNTuBVxhRUn9LJeTf5ZsAWVgwJSJLs oKhmfk20lZLbUqPCgFYRdd+WSxUtwqQfcYegwh5FFvR0F0Vcrh8CSYnAxWF+KNXxPa8J gwXjJFslGu7jwVvEqIxhqwi2vIEBj8J5tfqpa1aqDT4fqarlrMNLtk/YGwBwXv66jjtj QIwA76SwmQPBPdVjvLlupXvbgE4g7BGKOvJyQGX++FTd+1gyYoGSgADPyKr9CprOa8dR +6QFptc8lhBPwHVv4x3I76pQnU9iUQRskMDEg6niLDBrcW5xvUwbMN64RKV5FL3bmxvk j13A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=lnwYgCTBbPjPzlA/mQRgPbXLK3zWwD69ZZNdNX1+ojI=; b=s+nPgnjrZFhDwb2YI52/cBN60rl/j0tXn7dpSWSsFykErx40XcV8tG1sSrRIf5ZzIo 5gg4uag70MgHwZyiAG9aoPO4uLr35Vgow/B8UP1f1zAPG1IaDzR3SwB2AKxOh9T9mncL 76iahVLpyR8+if2z93/q6TlbHtelzKCAp5rX2KYNFt0Sxfe0QRsOcGIUFpMMcR6L3WQ2 ydHMbKxuenW84RmsDDa9Eix/g9WHe0p9ggLckwcQbuSfbohtI1v1ysH7FjV1gvUd4jwh AjfTAh2iD3xENbGW2wzvXAX2KYZE4iVZLvoP68Z5RlBGF2seJMlqHCh+7iEBSfmKS/61 H+fQ== X-Gm-Message-State: AJaThX7I8WFN90rHu+Bhf7ifQdF5/APcE2nNhnOJ1RKbYUEN4pftKMoJ ZGr3zl34nxw1MFqqUkvZMPjEmQ== X-Google-Smtp-Source: AGs4zMbCOhlmzopkhC0773oLjiJzi5PzHVNiuoEUTjBDS9GtPgJBlGQZPxwYlfknE6+N2BUrK3wa4w== X-Received: by 10.200.19.11 with SMTP id e11mr5652904qtj.68.1510406629812; Sat, 11 Nov 2017 05:23:49 -0800 (PST) Received: from roblaptop ([2804:14d:baa0:8491:461e:a1ff:fe19:c7bd]) by smtp.gmail.com with ESMTPSA id d205sm4520903qke.21.2017.11.11.05.23.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 11 Nov 2017 05:23:49 -0800 (PST) Message-ID: <1510406626.7270.14.camel@gmail.com> Subject: Re: pg on Debian servers From: rob stone To: Mark Morgan Lloyd , pgsql-general@PostgreSQL.org Date: Sun, 12 Nov 2017 00:23:46 +1100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.2-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org 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. You can disable the postgresql service and re-name the script in init.d. You then have to start postgres via a shell script. 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 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. HTH. Cheers, Rob -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general