Logical Tape Set: lazily allocate read buffer.

Jeff Davis <jdavis@postgresql.org>

Commit: 7fdd919ae7550f478e7ae4031f7f439278cf2282
Author: Jeff Davis <jdavis@postgresql.org>
Date: 2020-02-13T18:44:25Z
Releases: 13.0
Logical Tape Set: lazily allocate read buffer.

The write buffer was already lazily-allocated, so this is more
symmetric. It also means that a freshly-rewound tape (whether for
reading or writing) is not consuming memory for the buffer.

Discussion: https://postgr.es/m/97c46a59c27f3c38e486ca170fcbc618d97ab049.camel%40j-davis.com

Files

PathChange+/−
src/backend/utils/sort/logtape.c modified +36 −7

Discussion