Re: [BUG]: the walsender does not update its IO statistics until it exits - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [BUG]: the walsender does not update its IO statistics until it exits
Date
Msg-id Z8F3ZH0kLeYz4yg7@paquier.xyz
Whole thread Raw
In response to Re: [BUG]: the walsender does not update its IO statistics until it exits  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Fri, Feb 28, 2025 at 02:41:34PM +0900, Michael Paquier wrote:
> With smaller records, the loop can become hotter, can't it?  Also,
> there can be a high number of WAL senders on a single node, and I've
> heard of some customers with complex logical decoding deployments with
> dozens of logical WAL senders.  Isn't there a risk of having this code
> path become a point of contention?  It seems to me that we should
> benchmark this change more carefully, perhaps even reduce the
> frequency of the report calls.

One idea here would be to have on a single host one server with a set
of N pg_receivewal processes dumping their WAL segments into a tmpfs,
while a single session generates a bunch of records with a minimal
size using pg_logical_emit_message().  Monitoring the maximum
replication lag with pg_stat_replication and looking at some perf
profiles of the cluster should show how these stats reports affect the
replication setup efficiency.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Benoit Lobréau
Date:
Subject: Re: long-standing data loss bug in initial sync of logical replication
Next
From: Maxim Orlov
Date:
Subject: Re: Proposal: Limitations of palloc inside checkpointer