public inbox for [email protected]
help / color / mirror / Atom feedRe: Fast switchover
4+ messages / 3 participants
[nested] [flat]
* Re: Fast switchover
@ 2025-09-08 19:54 Laurenz Albe <[email protected]>
0 siblings, 2 replies; 4+ messages in thread
From: Laurenz Albe @ 2025-09-08 19:54 UTC (permalink / raw)
To: legrand legrand <[email protected]>; [email protected] <[email protected]>
On Mon, 2025-09-08 at 15:03 +0000, legrand legrand wrote:
> For some projects we need a fast manual switchover to address Near Zero downtime maintenance
> (not speaking here about automated failover like those provided by HA tools, but just planned, controlled operations)
>
> Database Physical replication switchover itself:
> - initial replication (before switchover) should be synchronous or replication LAG should be controlled to prevent data loss.
> - Switchover duration seems not "compressible" under a few seconds (because of primary shutdown, promotion, new standby catch up, ...)
> - Application retry strategy (after disconnection) should be tuned using proper retry delay. Pooler or specific driver may help.
There is no need for synchronous replication; you cannot lose data with a switchover,
if you do it right:
- run a CHACKPOINT on the primary (to speed up the shutdown)
- when the checkpoint is done, perform a clean shutdown
- when the primary is down, promote the standby
The primary will transmit *all* data to the standby before it shuts down.
> May logical replication ( bi-directional, with one instance RW and the other RO) be a better solution ?
I'd say no.
> what could we expect (in term of downtime in both worlds) ?
Usually seconds, so plan for ten minutes.
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 4+ messages in thread
* RE: Fast switchover
@ 2025-09-08 20:31 Klaus Darilion <[email protected]>
parent: Laurenz Albe <[email protected]>
1 sibling, 0 replies; 4+ messages in thread
From: Klaus Darilion @ 2025-09-08 20:31 UTC (permalink / raw)
To: [email protected] <[email protected]>
> > what could we expect (in term of downtime in both worlds) ?
>
> Usually seconds, so plan for ten minutes.
*lol*
So true ...
^ permalink raw reply [nested|flat] 4+ messages in thread
* =?Windows-1252?Q?Re=A0:_Fast_switchover?=
@ 2025-09-09 05:07 legrand legrand <[email protected]>
parent: Laurenz Albe <[email protected]>
1 sibling, 1 reply; 4+ messages in thread
From: legrand legrand @ 2025-09-09 05:07 UTC (permalink / raw)
To: Laurenz Albe <[email protected]>; [email protected] <[email protected]>
Hi Laurenz,
Thank you for your answer
>> For some projects we need a fast manual switchover to address Near Zero downtime maintenance
I forgot to say that application would not be stopped during maintenance…
>There is no need for synchronous replication; you cannot lose data with a switchover,
>if you do it right:
Ok
>> May logical replication ( bi-directional, with one instance RW and the other RO) be a better solution ?
> I'd say no.
Really ?
>> what could we expect (in term of downtime in both worlds) ?
> Usually seconds, so plan for ten minutes.
Brrr, I was thînking about a more reliable process.
Regards
PAscal
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Re : Fast switchover
@ 2025-09-09 05:22 Laurenz Albe <[email protected]>
parent: legrand legrand <[email protected]>
0 siblings, 0 replies; 4+ messages in thread
From: Laurenz Albe @ 2025-09-09 05:22 UTC (permalink / raw)
To: legrand legrand <[email protected]>; [email protected] <[email protected]>
On Tue, 2025-09-09 at 05:07 +0000, legrand legrand wrote:
> > > what could we expect (in term of downtime in both worlds) ?
>
> > Usually seconds, so plan for ten minutes.
>
> Brrr, I was thînking about a more reliable process.
If you want more reliable numbers, make a test run on your system.
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2025-09-09 05:22 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-09-08 19:54 Re: Fast switchover Laurenz Albe <[email protected]>
2025-09-08 20:31 ` Klaus Darilion <[email protected]>
2025-09-09 05:07 ` =?Windows-1252?Q?Re=A0:_Fast_switchover?= legrand legrand <[email protected]>
2025-09-09 05:22 ` Re: Re : Fast switchover Laurenz Albe <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox