Avoid fragmentation of logical tapes when writing concurrently.
authorJeff Davis <[email protected]>
Tue, 26 May 2020 23:06:30 +0000 (16:06 -0700)
committerJeff Davis <[email protected]>
Tue, 26 May 2020 23:49:43 +0000 (16:49 -0700)
commit896ddf9b3cd7dcf70e43f733ae8fec5dfe6e31af
tree84e81fa15f27efd29660550f59729c73724a40cd
parent49223e106b0a43452d64b4e52719532012c81e25
Avoid fragmentation of logical tapes when writing concurrently.

Disk-based HashAgg relies on writing to multiple tapes
concurrently. Avoid fragmentation of the tapes' blocks by
preallocating many blocks for a tape at once. No file operations are
performed during preallocation; only the block numbers are reserved.

Reviewed-by: Tomas Vondra
Discussion: https://postgr.es/m/20200519151202.u2p2gpiawoaznsv2%40development
src/backend/utils/sort/logtape.c