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.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/f83b59997d29f06c3d67e7eb9a1f2c9cd017d665
Modified Files
--------------
src/backend/access/transam/twophase.c | 21 ---------------------
src/backend/access/transam/xact.c | 7 -------
src/backend/access/transam/xlog.c | 25 ++++++++++++++++++-------
src/backend/port/unix_latch.c | 3 +++
src/backend/port/win32_latch.c | 4 ++++
src/backend/replication/walsender.c | 11 ++++++++++-
src/include/replication/walsender.h | 24 ++++++++++++++++++++++++
7 files changed, 59 insertions(+), 36 deletions(-)
Responses
pgsql-hackers by date
| Next: | From: Robert Haas | Date: 2012-07-02 13:51:08 |
| Subject: Re: [PATCH 01/16] Overhaul walsender wakeup handling |
| Previous: | From: Nils Goroll | Date: 2012-07-02 13:02:48 |
| Subject: Re: Update on the spinlock->pthread_mutex patch experimental:
replace s_lock spinlock code with pthread_mutex on linux |
pgsql-committers by date
| Next: | From: Robert Haas | Date: 2012-07-02 14:31:15 |
| Subject: pgsql: Make commit_delay much smarter. |
| Previous: | From: Tom Lane | Date: 2012-07-01 21:13:19 |
| Subject: pgsql: Fix race condition in enum value comparisons. |