You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
"Blind writes" are a mechanism to push buffers down to disk whenevicting them; since they may belong to different databases than the onea backend is connected to, the backend does not necessarily have arelation to link them to, and thus no way to blow them away. We werekeeping those files open indefinitely, which would cause a problem ifthe underlying table was deleted, because the operating system would notbe able to reclaim the disk space used by those files.To fix, have bufmgr mark such files as transient to smgr; the lowerlayer is allowed to close the file descriptor when the currenttransaction ends. We must be careful to have any other access of thefile to remove the transient markings, to prevent unnecessary expensivesystem calls when evicting buffers belonging to our own database (whichfiles we're likely to require again soon.)This commit fixes a bug in the previous one, which neglected to cleanlyhandle the LRU ring that fd.c uses to manage open files, and caused anunacceptable failure just before beta2 and was thus reverted.