Backport fsync queue compaction logic to all supported branches.

Robert Haas <rhaas@postgresql.org>

Commit: 73a3b1d4589eaf3dc7f0a573727a2a6ac5279e6a
Author: Robert Haas <rhaas@postgresql.org>
Date: 2012-06-26T10:40:58Z
Releases: 9.0.9
Backport fsync queue compaction logic to all supported branches.

This backports commit 7f242d880b5b5d9642675517466d31373961cf98,
except for the counter in pg_stat_bgwriter.  The underlying problem
(namely, that a full fsync request queue causes terrible checkpoint
behavior) continues to be reported in the wild, and this code seems
to be safe and robust enough to risk back-porting the fix.

Files

PathChange+/−
src/backend/postmaster/bgwriter.c modified +120 −9
src/backend/storage/smgr/md.c modified +7 −1