> [!BufFileTruncate]
> <table><tr><td rowspan="4" width="25%"><img src="assets/wl_io_buffiletruncate.png"></td><td><b>Wait Category</b></td><td>IO</td></tr><tr><td><b>Mechanism</b></td><td><code>BufFile</code></td></tr><tr><td><b>Operations</b></td><td><a href="Operations/ResultSet/Sort">Sort</a>, <a href="Operations/ResultSet/Hash">Hash</a></td></tr><tr><td><b>Resources</b></td><td><a href="Resources/disk IO">disk IO</a>, <a href="Resources/CPU">CPU</a></td></tr><tr><td colspan="3"><b>Temporary Resource Cleanup Penalty</b>. To prevent temporary storage (governed by <code>work_mem</code>) from permanently consuming disk space, Postgres must physically shrink the underlying files on the filesystem once they are no longer needed.</td></tr></table>