Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k3oE4-0003XS-Ng for pgsql-general@arkaria.postgresql.org; Thu, 06 Aug 2020 22:19:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k3oE2-00008Q-PD for pgsql-general@arkaria.postgresql.org; Thu, 06 Aug 2020 22:19:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k3oE2-00008J-GF for pgsql-general@lists.postgresql.org; Thu, 06 Aug 2020 22:19:02 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k3oE0-0005a0-B5 for pgsql-general@postgresql.org; Thu, 06 Aug 2020 22:19:01 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1k3oDz-0006GA-N8; Thu, 06 Aug 2020 18:18:59 -0400 Date: Thu, 6 Aug 2020 18:18:59 -0400 From: Bruce Momjian To: David Gauthier Cc: Postgres General Subject: Re: Can PAF be used to provide zero downtime while primary and backup servers are being patched? Message-ID: <20200806221859.GA23564@momjian.us> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Aug 6, 2020 at 10:01:21AM -0400, David Gauthier wrote: > Our IT dept needs to install a patch on both primary and backup servers for our > Postgres Automatic Failover configured DB (version 9.6 on linux).  From the > standpoint of the DB users, can a strategy be implemented such that they see > zero downtime during this process as the 2 servers are taken down in sequence > for their patch, switching the role of primary and backup as this happens ? Assuming this is a minor relase upgrade, you can do it by just bouncing the servers. You can do the switch-over/switch-back too, but you have to manage session migration. I wrote a blog about it: https://momjian.us/main/blogs/pgblog/2018.html#October_1_2018 -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee