Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rIrKN-00AhgT-RU for pgsql-admin@arkaria.postgresql.org; Thu, 28 Dec 2023 14:25:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rIrKM-00Gd12-IN for pgsql-admin@arkaria.postgresql.org; Thu, 28 Dec 2023 14:25:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rIrKM-00Gd0r-5f for pgsql-admin@lists.postgresql.org; Thu, 28 Dec 2023 14:25:38 +0000 Received: from mailout.easymail.ca ([64.68.200.34]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rIrKI-00Cc23-Tn for pgsql-admin@lists.postgresql.org; Thu, 28 Dec 2023 14:25:36 +0000 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id F00C465A9E; Thu, 28 Dec 2023 14:25:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=elevated-dev.com; s=easymail; t=1703773531; bh=lGLXEkuFxlchVh/N53Mac3BvZ2qhvUf6uRPGzaUv1eo=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=XVKFtiW8TABybMtcd3+rbKXCYGdi5jVoJobvxmjuP55gQHHzKcv3BKOCfTSyrqD3l l17F/9KFurDvh10X+e1JSVQefDw/Q5bG3357mkPX+jX4CU6Cj7SeZmK6RwEeI96QKg tZwgLuwuID5OxvMYHSxfTqvE3i15qyNOCRp4ceMuaHQsUpM+M5riondWmTuXZFtJIz zO3/4k0KON3PB65gCFXPm36uSbHimXmZEnVKySw5T5g44oOGkIP2UZu+KjSI3FBKD8 4mm38B2KumNR8UPuvvNGC+Gd4zYsw4P2Izd50XM/4trH+yOow0DdjbF8FpjDdHfxYi qpY9+/iFfCi2w== X-Virus-Scanned: Debian amavisd-new at emo07-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo07-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Lk-vrZgfKEcO; Thu, 28 Dec 2023 14:25:31 +0000 (UTC) Received: from smtpclient.apple (unknown [165.140.184.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 6210D65A86; Thu, 28 Dec 2023 14:25:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=elevated-dev.com; s=easymail; t=1703773531; bh=lGLXEkuFxlchVh/N53Mac3BvZ2qhvUf6uRPGzaUv1eo=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=XVKFtiW8TABybMtcd3+rbKXCYGdi5jVoJobvxmjuP55gQHHzKcv3BKOCfTSyrqD3l l17F/9KFurDvh10X+e1JSVQefDw/Q5bG3357mkPX+jX4CU6Cj7SeZmK6RwEeI96QKg tZwgLuwuID5OxvMYHSxfTqvE3i15qyNOCRp4ceMuaHQsUpM+M5riondWmTuXZFtJIz zO3/4k0KON3PB65gCFXPm36uSbHimXmZEnVKySw5T5g44oOGkIP2UZu+KjSI3FBKD8 4mm38B2KumNR8UPuvvNGC+Gd4zYsw4P2Izd50XM/4trH+yOow0DdjbF8FpjDdHfxYi qpY9+/iFfCi2w== Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.300.61.1.2\)) Subject: Re: Switchover From: Scott Ribe In-Reply-To: Date: Thu, 28 Dec 2023 07:25:20 -0700 Cc: Pgsql-admin Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Rajesh Kumar X-Mailer: Apple Mail (2.3774.300.61.1.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk In my experience: - Patroni switchover happens in a few seconds - If you use pgbouncer, the client connections don't get dropped. A = client that issues a query in that brief window will get an error. - If your clients have retry logic, your users will never notice the = failover. -- Scott Ribe scott_ribe@elevated-dev.com https://www.linkedin.com/in/scottribe/ > On Dec 27, 2023, at 10:38=E2=80=AFPM, Rajesh Kumar = wrote: >=20 > Do I have to take a downtime of few mns and stop the applications and = do a switchover? >=20 > What happens internally when we use the command patronictl switchover? = Just that the role is changed? Will it affect incoming connections? >=20 > On Sat, 23 Dec 2023, 23:38 Rajesh Kumar, = wrote: > Hi all, >=20 >=20 > Any idea what prerequisite I should follow before I use the command = patronictl switchover?