> On 23 Mar 2024, at 14:22, Bharath Rupireddy 
> <bharath.rupireddyforpostg...@gmail.com> wrote:
> 
> IMHO, it makes sense to have something like replay_source_order if
> there's any use case that arises in future requiring the standby to
> intentionally switch to pg_wal or archive. But not as part of this
> feature.

IMO, it's vital part of a feature.

In my observation restore from archive is many orders of magnitude faster than 
streaming replication. Advanced archive tools employ compression (x6 to speed), 
download parallelism (x4), are not constrained be primary's network limits (x3) 
and disk limits, do not depend on complicated FEBE protocol, etc.
When I have to cope with lagging replica, almost always I kill walreceiver and 
tweak server readahead.

But there might be cases where you still have to attach replica ASAP. I can 
think of releasing replication slot, transiently failed archive network or 
storage.

Finally, one might want to have many primary connections: cascading replica 
might want to stream from any available host from the group of HA hosts.


Best regards, Andrey Borodin.

Reply via email to