Thread: pgsql: Make walsender more responsive.
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(-)
Robert Haas <rhaas@postgresql.org> writes: > Make walsender more responsive. ... > Andres Freund. Review and stylistic cleanup by me. The comments could have used a bit more copy-editing. (I got a good laugh out of the idea of "contented locks".) regards, tom lane
On Mon, Jul 2, 2012 at 10:34 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Robert Haas <rhaas@postgresql.org> writes: >> Make walsender more responsive. ... >> Andres Freund. Review and stylistic cleanup by me. > > The comments could have used a bit more copy-editing. > > (I got a good laugh out of the idea of "contented locks".) Uh... what? I thought the meaning of that was perfectly clear. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Robert Haas <robertmhaas@gmail.com> writes: > On Mon, Jul 2, 2012 at 10:34 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> (I got a good laugh out of the idea of "contented locks".) > Uh... what? I thought the meaning of that was perfectly clear. My dictionary defines "contented" as "happy and at ease". I think the word intended here is "contended": + /* wakeup the WalSnd now that we outside contented locks */ not to mention that this sentence no verb. I don't hold such things against patch submitters whose first language isn't English, but committers whose first language *is* English ought to fix them. regards, tom lane
On Mon, Jul 2, 2012 at 11:06 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Robert Haas <robertmhaas@gmail.com> writes: >> On Mon, Jul 2, 2012 at 10:34 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >>> (I got a good laugh out of the idea of "contented locks".) > >> Uh... what? I thought the meaning of that was perfectly clear. > > My dictionary defines "contented" as "happy and at ease". I think > the word intended here is "contended": Oh, nuts. My eyes skimmed right over that one after you pointed it out. > + /* wakeup the WalSnd now that we outside contented locks */ > > not to mention that this sentence no verb. I don't hold such things > against patch submitters whose first language isn't English, but > committers whose first language *is* English ought to fix them. OK. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company