mirror of
https://github.com/postgres/postgres.git
synced 2025-07-24 14:22:24 +03:00
Make walsender more responsive.
Per testing by Andres Freund, this improves replication performance and reduces replication latency and latency jitter. I was a bit concerned about moving more work into XLogInsert, but testing seems to show that it's not a problem in practice. Along the way, improve comments for WaitLatchOrSocket. Andres Freund. Review and stylistic cleanup by me.
This commit is contained in:
@ -1141,13 +1141,6 @@ RecordTransactionCommit(void)
|
||||
|
||||
XLogFlush(XactLastRecEnd);
|
||||
|
||||
/*
|
||||
* Wake up all walsenders to send WAL up to the COMMIT record
|
||||
* immediately if replication is enabled
|
||||
*/
|
||||
if (max_wal_senders > 0)
|
||||
WalSndWakeup();
|
||||
|
||||
/*
|
||||
* Now we may update the CLOG, if we wrote a COMMIT record above
|
||||
*/
|
||||
|
Reference in New Issue
Block a user