<div class="gmail_quote">2011/3/30 Robert Haas <span dir="ltr"><<a
href="mailto:robertmhaas@gmail.com">robertmhaas@gmail.com</a>></span><br/><blockquote class="gmail_quote"
style="margin:00 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div id=":19i">Maybe we could check
PD_ALL_VISIBLEbefore<br /> taking the buffer lock - if it appears to be set, then we pin the<br /> visibility map page
beforetaking the buffer lock. Otherwise, we take<br /> the buffer lock at once. Either way, once we have the lock,
we<br/> recheck the bit. Only if it's set and we haven't got a pin do we need<br /> to do the
drop-lock-pin-reacquire-lockdance. Is that at all<br /> sensible?</div></blockquote></div><br />But only lock can make
surethe page has enough free space.<br />If we try the drop-lock-...-lock dance, we may fall into a dead loop.<br /><br
/>--<br />GaoZengqi<br /><a href="mailto:pgf00a@gmail.com">pgf00a@gmail.com</a><br /><a
href="mailto:zengqigao@gmail.com">zengqigao@gmail.com</a><br/>