pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
AW:  AW: AW: AW: broken backup trail in case of quickly patroni switchback and forth
2+ messages / 2 participants
[nested] [flat]

* AW:  AW: AW: AW: broken backup trail in case of quickly patroni switchback and forth
@ 2019-11-08 12:51 Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
  2019-11-08 14:57 ` Re:  AW:  AW: AW: AW: broken backup trail in case of quickly patroni switchback and forth Brad Nicholson <bradn@ca.ibm.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Zwettler Markus (OIZ) @ 2019-11-08 12:51 UTC (permalink / raw)
  To: Brad Nicholson <bradn@ca.ibm.com>; +Cc: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

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.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re:  AW:  AW: AW: AW: broken backup trail in case of quickly patroni switchback and forth
  2019-11-08 12:51 AW:  AW: AW: AW: broken backup trail in case of quickly patroni switchback and forth Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
@ 2019-11-08 14:57 ` Brad Nicholson <bradn@ca.ibm.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Brad Nicholson @ 2019-11-08 14:57 UTC (permalink / raw)
  To: Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>; +Cc: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

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

> From: "Zwettler Markus (OIZ)" <Markus.Zwettler@zuerich.ch>
> To: Brad Nicholson <bradn@ca.ibm.com>
> Cc: Adrian Klaver <adrian.klaver@aklaver.com>, "pgsql-
> general@lists.postgresql.org" <pgsql-general@lists.postgresql.org>
> Date: 2019/11/08 07:51 AM
> Subject: [EXTERNAL] AW:  AW: AW: AW: broken backup trail in case of
> quickly patroni switchback and forth
>
> 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.


If it can't do a clean shutdown, that points to something wrong with
Postgres itself.  Why doesn't a fast shutdown work for you in those cases?

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

Sure, but you should be looking at why Postgres can't cleanly shutdown.

How are you telling Patroni to switchover? Are you using the Patroni
switchover command via patronictl or the API, or sending a signal to the
Patroni process?  I think the explicit switchover
command will not behave this way.  It will return you a 503 if it can't
switchover and not change the primary (that is something you can confirm
with the Patroni developers).

Brad.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2019-11-08 14:57 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-11-08 12:51 AW:  AW: AW: AW: broken backup trail in case of quickly patroni switchback and forth Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
2019-11-08 14:57 ` Brad Nicholson <bradn@ca.ibm.com>

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