From: | Robert Haas <rhaas(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Try to avoid running with a full fsync request queue. |
Date: | 2011-01-29 13:10:59 |
Message-ID: | E1PjAZv-0004Tr-PW@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Try to avoid running with a full fsync request queue.
When we need to insert a new entry and the queue is full, compact the
entire queue in the hopes of making room for the new entry. Doing this
on every insertion might worsen contention on BgWriterCommLock, but
when the queue it's full, it's far better than allowing the backend to
perform its own fsync, per testing by Greg Smith as reported in
http://archives.postgresql.org/pgsql-hackers/2011-01/msg02665.php
Original idea from Greg Smith. Patch by me. Review by Chris Browne
and Greg Smith
Branch
------
master
Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=7f242d880b5b5d9642675517466d31373961cf98
Modified Files
--------------
src/backend/postmaster/bgwriter.c | 134 ++++++++++++++++++++++++++++++++++---
src/backend/storage/smgr/md.c | 8 ++-
2 files changed, 131 insertions(+), 11 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2011-01-29 16:15:21 | pgsql: Use GSSAPI library for SSPI auth, when native SSPI is not availa |
Previous Message | Tom Lane | 2011-01-28 19:35:30 | pgsql: Copy-edit a paragraph in the contrib/seg documentation. |