Re: High CPU consumption in cascade replication with large number of walsenders and ConditionVariable broadcast issues - Mailing list pgsql-hackers

From Alexey Makhmutov
Subject Re: High CPU consumption in cascade replication with large number of walsenders and ConditionVariable broadcast issues
Date
Msg-id 4ddbd5f9-aeec-4cfe-8145-d60e06633428@postgrespro.ru
Whole thread Raw
In response to High CPU consumption in cascade replication with large number of walsenders and ConditionVariable broadcast issues  (Alexey Makhmutov <a.makhmutov@postgrespro.ru>)
List pgsql-hackers
 > We’ve prepared two test patches on top of current master to address 
both issues:
 > ...
 > * 0002-Implement-batching-for-cascade-replication.patch – test patch 
to implement possible batching approach in xlogreceiver.c with timer. 
Currently it uses GUC variables to allow testing of different batch 
sizes and timeout values.

I've played with the second patch a little more and made some 
adjustments to it:
1. Setup timer only if we actually have applied messages, which are 
(potentially) not yet signaled to walsenders.
2. Notify logical walsenders without delay if time line has changed.

Modified patch is attached.

Thanks,
Alexey

Attachment

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Non-text mode for pg_dumpall
Next
From: Rahila Syed
Date:
Subject: Re: Improve monitoring of shared memory allocations