mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +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:
@ -418,6 +418,9 @@ WaitLatchOrSocket(volatile Latch *latch, int wakeEvents, pgsocket sock,
|
||||
* NB: when calling this in a signal handler, be sure to save and restore
|
||||
* errno around it. (That's standard practice in most signal handlers, of
|
||||
* course, but we used to omit it in handlers that only set a flag.)
|
||||
*
|
||||
* NB: this function is called from critical sections and signal handlers so
|
||||
* throwing an error is not a good idea.
|
||||
*/
|
||||
void
|
||||
SetLatch(volatile Latch *latch)
|
||||
|
Reference in New Issue
Block a user