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 1iSlRA-00008X-GJ for pgsql-general@arkaria.postgresql.org; Thu, 07 Nov 2019 17:19:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iSlR9-0007YP-2v for pgsql-general@arkaria.postgresql.org; Thu, 07 Nov 2019 17:19:11 +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 1iSlR8-0007YI-PS for pgsql-general@lists.postgresql.org; Thu, 07 Nov 2019 17:19:10 +0000 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5] helo=mx0a-001b2d01.pphosted.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iSlR5-0002HZ-Cc for pgsql-general@lists.postgresql.org; Thu, 07 Nov 2019 17:19:09 +0000 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id xA7HDIm7114526 for ; Thu, 7 Nov 2019 12:19:03 -0500 Received: from smtp.notes.na.collabserv.com (smtp.notes.na.collabserv.com [192.155.248.73]) by mx0a-001b2d01.pphosted.com with ESMTP id 2w4nmwx6cj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 07 Nov 2019 12:19:03 -0500 Received: from localhost by smtp.notes.na.collabserv.com with smtp.notes.na.collabserv.com ESMTP for from ; Thu, 7 Nov 2019 17:19:03 -0000 Received: from us1a3-smtp04.a3.dal06.isc4sb.com (10.106.154.237) by smtp.notes.na.collabserv.com (10.106.227.90) with smtp.notes.na.collabserv.com ESMTP; Thu, 7 Nov 2019 17:18:59 -0000 Received: from us1a3-mail217.a3.dal06.isc4sb.com ([10.146.71.30]) by us1a3-smtp04.a3.dal06.isc4sb.com with ESMTP id 2019110717185878-741225 ; Thu, 7 Nov 2019 17:18:58 +0000 MIME-Version: 1.0 In-Reply-To: <9984e05af67d48bdaf730a934e63c513@zuerich.ch> To: "Zwettler Markus (OIZ)" Cc: Adrian Klaver , "pgsql-general@lists.postgresql.org" From: "Brad Nicholson" Date: Thu, 7 Nov 2019 12:18:57 -0500 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> X-KeepSent: A5C55DB5:DD4DD6DF-852584AB:005DDB80; type=4; name=$KeepSent X-Mailer: IBM Notes Build V1001FP1_03262019 March 26, 2019 X-LLNOutbound: False X-Disclaimed: 65463 X-TNEFEvaluated: 1 Content-type: multipart/alternative; Boundary="0__=0ABB0E38DFCE5D108f9e8a93df938690918c0ABB0E38DFCE5D10" Content-Disposition: inline x-cbid: 19110717-8877-0000-0000-000001BE1B80 X-IBM-SpamModules-Scores: BY=0; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0; SC=0.4332; ST=0; TS=0; UL=0; ISC=; MB=0.059879 X-IBM-SpamModules-Versions: BY=3.00012070; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000292; SDB=6.01286780; UDB=6.00682290; IPR=6.01068945; MB=3.00029418; MTD=3.00000008; XFM=3.00000015; UTC=2019-11-07 17:19:02 X-IBM-AV-DETECTION: SAVI=unsuspicious REMOTE=unsuspicious XFE=unused X-IBM-AV-VERSION: SAVI=2019-11-07 11:24:33 - 6.00010620 x-cbparentid: 19110717-8878-0000-0000-000066943DBD Message-Id: Subject: Re: AW: AW: AW: broken backup trail in case of quickly patroni switchback and forth X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-11-07_05:,, signatures=0 X-Proofpoint-Spam-Reason: safe List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0__=0ABB0E38DFCE5D108f9e8a93df938690918c0ABB0E38DFCE5D10 Content-Transfer-Encoding: quoted-printable Content-type: text/plain; charset=US-ASCII "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=5Frewind or pg=5Fbasebackup) of the former primary. This is not accurate. Patroni does 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 the wal stream is transmitted to the replica and the wal files are archived. Immediate shutdown will not do any of this. This issue explains 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 I agree with the Patroni folks that this is not a Patroni issue, but simply how Postgres responds to the required shutdown types. --0__=0ABB0E38DFCE5D108f9e8a93df938690918c0ABB0E38DFCE5D10 Content-Transfer-Encoding: quoted-printable Content-type: text/html; charset=US-ASCII Content-Disposition: inline

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

> = From: "Zwettler Markus (OIZ)" <Markus.Zwettler@zuerich.ch><= /font>

> To: Adrian Klaver <adrian.klave= r@aklaver.com>, "pgsql-
> general@lists.postgresql.org" = <pgsql-general@lists.postgresql.org>

> Date: 2019/11/07 11:33 AM
>= Subject: [EXTERNAL] AW: AW: AW: broken backup trail in case of
> qu= ickly patroni switchback and forth

>=
> 3)
> Patroni does only failovers. Also in case of regular s= hutdown of the
> primary. A failover is a promote of the standby + au= tomatic
> reinstate (pg=5Frewind or pg=5Fbasebackup) of the former p= rimary.


This is not accurate. &= nbsp;Patroni does controlled switchovers as well as failovers.  Contro= lled switchover issues a fast shutdown to Postgres, hard ones issue an imme= diate shutdown.  From this point, it's how Postgres responds to those = that matter.  

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

https://github.com/zalando/patroni/issues/837#issuecom= ment-433686687


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

--0__=0ABB0E38DFCE5D108f9e8a93df938690918c0ABB0E38DFCE5D10--