Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iT3jo-0007cp-Nc for pgsql-general@arkaria.postgresql.org; Fri, 08 Nov 2019 12:51:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iT3jm-0001hv-Ol for pgsql-general@arkaria.postgresql.org; Fri, 08 Nov 2019 12:51:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iT3jm-0001ho-E1 for pgsql-general@lists.postgresql.org; Fri, 08 Nov 2019 12:51:38 +0000 Received: from mx2.stadt-zuerich.ch ([194.56.33.11]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iT3jj-0006w8-Du for pgsql-general@lists.postgresql.org; Fri, 08 Nov 2019 12:51:37 +0000 X-IronPort-AV: E=Sophos;i="5.68,281,1569276000"; d="scan'208,217";a="35800396" Received: from unknown (HELO SZHM29235.global.szh.loc) ([10.7.49.100]) by mx2.prm.szh.zone with ESMTP/TLS/AES256-GCM-SHA384; 08 Nov 2019 13:51:34 +0100 Received: from SZHM27370.global.szh.loc (10.7.50.50) by SZHM29235.global.szh.loc (10.7.49.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 8 Nov 2019 13:51:34 +0100 Received: from SZHM27370.global.szh.loc ([fe80::25ce:879f:5795:3325]) by SZHM27370.global.szh.loc ([fe80::25ce:879f:5795:3325%10]) with mapi id 15.01.1713.004; Fri, 8 Nov 2019 13:51:34 +0100 From: "Zwettler Markus (OIZ)" To: Brad Nicholson CC: Adrian Klaver , "pgsql-general@lists.postgresql.org" Subject: AW: AW: AW: AW: broken backup trail in case of quickly patroni switchback and forth Thread-Topic: AW: AW: AW: broken backup trail in case of quickly patroni switchback and forth Thread-Index: AdWVcgVjAYaHSdMNTcaqvXVaKV5EKwAAlFEAAAJ2vJD///IAgP//7MlggAAesYD//+zFwIAAJ3qA//6s9nA= Date: Fri, 8 Nov 2019 12:51:33 +0000 Message-ID: <5c019721473149aeabaaf7bd552f7e0d@zuerich.ch> References: <0613f7e85acf4972837408cfc6260387@zuerich.ch> <436fa29a-0803-a511-206c-fd8c0086c50f@aklaver.com> <03dc57f7107f432d872bb00ddaa1a093@zuerich.ch> <26aad343-c08d-d53d-9788-c592450ce438@aklaver.com> <954fe6896a9645d6a597c0c743e28f7f@zuerich.ch> <9984e05af67d48bdaf730a934e63c513@zuerich.ch> In-Reply-To: Accept-Language: de-CH, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.7.48.249] Content-Type: multipart/alternative; boundary="_000_5c019721473149aeabaaf7bd552f7e0dzuerichch_" MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_5c019721473149aeabaaf7bd552f7e0dzuerichch_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable It depends. It is a switchover if Patroni could to a clean shutdown. But, i= t might start killing processes after a certain period if a normal shutdown= after SIGTERM didn't happen. This would not be a switchover anymore. In ot= her words there is no guarantee for a "clean" switchover. This might be the= reason why the Patroni guys are always talking about failover only. It's not a Patroni issue but it's triggered by Patroni as it will do "some = kind of switchover" on a regular shutdown. "Zwettler Markus (OIZ)" > wrote on 2019/11/07 11:32:42 AM: > From: "Zwettler Markus (OIZ)" > > To: Adrian Klaver >, "pgsql- > general@lists.postgresql.org" > > Date: 2019/11/07 11:33 AM > Subject: [EXTERNAL] AW: AW: AW: broken backup trail in case of > quickly patroni switchback and forth > > 3) > Patroni does only failovers. Also in case of regular shutdown of the > primary. A failover is a promote of the standby + automatic > reinstate (pg_rewind or pg_basebackup) of the former primary. This is not accurate. Patroni does controlled switchovers as well as failo= vers. Controlled switchover issues a fast shutdown to Postgres, hard ones = issue an immediate shutdown. From this point, it's how Postgres responds t= o those that matter. Fast shutdown will attempt to ensure the wal stream is transmitted to the r= eplica and the wal files are archived. Immediate shutdown will not do any = of this. This issue explains more about when Patroni may choose an immedia= te shutdown (it might not be totally accurate anymore as it's a year old). https://github.com/zalando/patroni/issues/837#issuecomment-433686687 I agree with the Patroni folks that this is not a Patroni issue, but simply= how Postgres responds to the required shutdown types. --_000_5c019721473149aeabaaf7bd552f7e0dzuerichch_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

It depends. It is a switchover = if Patroni could to a clean shutdown. But, it might start killing processes= after a certain period if a normal shutdown after SIGTERM didn't happen. T= his would not be a switchover anymore. In other words there is no guarantee for a "clean" switchover. T= his might be the reason why the Patroni guys are always talking about failo= ver only.

 

It's not a Patroni issue but it= 's triggered by Patroni as it will do "some kind of switchover" o= n a regular shutdown.

 

 

"Zwettler Markus (OIZ)" <Markus.Zwettler@zuerich.ch> wrote on 2019/11/07 11:32:42 AM:

> From: "Zwettler Markus (OIZ)" <
Markus.Zwettler@zuerich.ch>
> To: Adrian = Klaver <adrian.klaver@aklaver.co= m>, "pgsql-
>
general@lists.postgresq= l.org" <pgsql-gene= ral@lists.postgresql.org>
> Date: 2019/= 11/07 11:33 AM
> Subject: [E= XTERNAL] AW: AW: AW: broken backup trail in case of
> quickly patroni switchback and forth

>
> 3)
> Patroni does only failovers.
Also in case of regular shutdown of the
> primary. A failover is a promote of the standby + automatic
> reinstate (pg_rewind or pg_basebackup) of the former primary.=


This is not accurate.  Patroni do= es controlled switchovers as well as failovers.  Controlled switchover= issues a fast shutdown to Postgres, hard ones issue an immediate shutdown.=  From this point, it's how Postgres responds to those that matter.  

Fast shutdown will attempt to ensure t= he wal stream is transmitted to the replica and the wal files are archived.=  Immediate shutdown will not do any of this.  This issue explain= s more about when Patroni may choose an immediate shutdown (it might not be totally accurate anymore as it's a year old).

https://github.com/zalando/patroni/issues/837#issuecomment-433686687<= /a>


I agree with the Patroni folks that th= is is not a Patroni issue, but simply how Postgres responds to the required= shutdown types.

--_000_5c019721473149aeabaaf7bd552f7e0dzuerichch_--