From: Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
To: Brad Nicholson <bradn@ca.ibm.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: AW: AW: AW: AW: broken backup trail in case of quickly patroni switchback and forth
Date: Fri, 8 Nov 2019 12:51:33 +0000
Message-ID: <5c019721473149aeabaaf7bd552f7e0d@zuerich.ch> (raw)
In-Reply-To: <OFA5C55DB5.DD4DD6DF-ON852584AB.005DDB80-852584AB.005F1EAC@notes.na.collabserv.com>
References: <0613f7e85acf4972837408cfc6260387@zuerich.ch>
<436fa29a-0803-a511-206c-fd8c0086c50f@aklaver.com>
<03dc57f7107f432d872bb00ddaa1a093@zuerich.ch>
<26aad343-c08d-d53d-9788-c592450ce438@aklaver.com>
<954fe6896a9645d6a597c0c743e28f7f@zuerich.ch>
<c3414dad-0b99-f58c-8fe9-ca435eccd0ca@aklaver.com>
<9984e05af67d48bdaf730a934e63c513@zuerich.ch>
<OFA5C55DB5.DD4DD6DF-ON852584AB.005DDB80-852584AB.005F1EAC@notes.na.collabserv.com>
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. This would not be a switchover anymore. In other 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)" <Markus.Zwettler@zuerich.ch<mailto:Markus.Zwettler@zuerich.ch>> wrote on 2019/11/07 11:32:42 AM:
> From: "Zwettler Markus (OIZ)" <Markus.Zwettler@zuerich.ch<mailto:Markus.Zwettler@zuerich.ch>>
> To: Adrian Klaver <adrian.klaver@aklaver.com<mailto:adrian.klaver@aklaver.com>>, "pgsql-
> general@lists.postgresql.org<mailto:general@lists.postgresql.org>" <pgsql-general@lists.postgresql.org<mailto: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 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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: Markus.Zwettler@zuerich.ch, bradn@ca.ibm.com, adrian.klaver@aklaver.com
Subject: Re: broken backup trail in case of quickly patroni switchback and forth
In-Reply-To: <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> <c3414dad-0b99-f58c-8fe9-ca435eccd0ca@aklaver.com> <9984e05af67d48bdaf730a934e63c513@zuerich.ch> <OFA5C55DB5.DD4DD6DF-ON852584AB.005DDB80-852584AB.005F1EAC@notes.na.collabserv.com> <5c019721473149aeabaaf7bd552f7e0d@zuerich.ch>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox