Dear Andrei,
> > I have been spending time for benchmarking the patch set. Here is an updated
> > report.
> >
> I apologise if my question is incorrect. But what about asynchronous
> replication? Does this method help to reduce lag?
>
> My case is a replica located far from the main instance. There are an
> inevitable lag exists. Do your benchmarks provide any insights into the
> lag reduction?
Yes, ideally parallel apply can reduce the lag, but note that it affects after
changes are reached to the subscriber. It may not be so effective if lag is
caused by the network. If your transaction is large and you did not enable the
streaming option, changing it to 'on' or 'parallel' can improve the lag.
It allows to replicate changes before huge transactions are committed.
> Or the WALsender process that decodes WAL records from a
> hundred actively committing backends, a bottleneck here?
Can you clarify your use case bit more? E.g., how many instances subscribe the
change from the same publisher. The cheat sheet [1] may be helpful to distinguish
the bottleneck.
[1]: https://wiki.postgresql.org/wiki/Operations_cheat_sheet
Best regards,
Hayato Kuroda
FUJITSU LIMITED