Track logrep apply workers' last start times to avoid useless waits.
Enforce wal_retrieve_retry_interval on a per-subscription basis,
rather than globally, and arrange to skip that delay in case of
an intentional worker exit. This probably makes little difference
in the field, where apply workers wouldn't be restarted often;
but it has a significant impact on the runtime of our logical
replication regression tests (even though those tests use
artificially-small wal_retrieve_retry_interval settings already).
Nathan Bossart, with mostly-cosmetic editorialization by me
Discussion: https://postgr.es/m/20221122004119.GA132961@nathanxps13
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5a3a95385bd5a8f1a4fd50545b7efe9338581899
Modified Files
--------------
doc/src/sgml/config.sgml | 4 +
doc/src/sgml/monitoring.sgml | 10 ++
src/backend/commands/subscriptioncmds.c | 10 ++
src/backend/replication/logical/launcher.c | 232 ++++++++++++++++++++++------
src/backend/replication/logical/tablesync.c | 8 +
src/backend/replication/logical/worker.c | 20 +++
src/backend/storage/lmgr/lwlock.c | 4 +
src/include/replication/logicallauncher.h | 2 +
src/include/storage/lwlock.h | 2 +
9 files changed, 243 insertions(+), 49 deletions(-)