From: | Robert Haas <rhaas(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Make commit_delay much smarter. |
Date: | 2012-07-02 14:31:15 |
Message-ID: | E1Slhel-0006M4-SJ@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Make commit_delay much smarter.
Instead of letting every backend participating in a group commit wait
independently, have the first one that becomes ready to flush WAL wait
for the configured delay, and let all the others wait just long enough
for that first process to complete its flush. This greatly increases
the chances of being able to configure a commit_delay setting that
actually improves performance.
As a side consequence of this change, commit_delay now affects all WAL
flushes, rather than just commits. There was some discussion on
pgsql-hackers about whether to rename the GUC to, say, wal_flush_delay,
but in the absence of consensus I am leaving it alone for now.
Peter Geoghegan, with some changes, mostly to the documentation, by me.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/f11e8be3e812cdbbc139c1b4e49141378b118dee
Modified Files
--------------
doc/src/sgml/config.sgml | 35 ++++++++++++----------
doc/src/sgml/wal.sgml | 4 +--
src/backend/access/transam/xact.c | 19 ------------
src/backend/access/transam/xlog.c | 59 +++++++++++++++++++++++-------------
4 files changed, 58 insertions(+), 59 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-07-02 14:34:34 | Re: pgsql: Make walsender more responsive. |
Previous Message | Robert Haas | 2012-07-02 13:49:27 | pgsql: Make walsender more responsive. |