From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Track logrep apply workers' last start times to avoid useless wa
Date: Sun, 22 Jan 2023 19:08:57 +0000
Message-ID: <E1pJfi5-004xGC-57@gemulon.postgresql.org> (raw)
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(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Track logrep apply workers' last start times to avoid useless wa
In-Reply-To: <E1pJfi5-004xGC-57@gemulon.postgresql.org>
References: <E1pJfi5-004xGC-57@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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