Rearrange mdsync() looping logic to avoid the problem that a sufficiently
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 12 Apr 2007 17:11:07 +0000 (17:11 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 12 Apr 2007 17:11:07 +0000 (17:11 +0000)
commitd6c442fcbbd3707ba515e1f9540df58d11b72b63
treea1f82fe7319c8f6be7b92ea71367be4832195d9f
parentaae7ff0df859b7b8996e73384579fe6ee5f64621
Rearrange mdsync() looping logic to avoid the problem that a sufficiently
fast flow of new fsync requests can prevent mdsync() from ever completing.
This was an unforeseen consequence of a patch added in Mar 2006 to prevent
the fsync request queue from overflowing.  Problem identified by Heikki
Linnakangas and independently by ITAGAKI Takahiro; fix based on ideas from
Takahiro-san, Heikki, and Tom.

Back-patch as far as 8.1 because a previous back-patch introduced the problem
into 8.1 ...
src/backend/storage/smgr/md.c