Logical Tape Set: lazily allocate read buffer.
authorJeff Davis <jdavis@postgresql.org>
Thu, 13 Feb 2020 17:43:51 +0000 (09:43 -0800)
committerJeff Davis <jdavis@postgresql.org>
Thu, 13 Feb 2020 18:44:25 +0000 (10:44 -0800)
commit7fdd919ae7550f478e7ae4031f7f439278cf2282
tree07fbfd895cc07b0e05fcc6491e77665359959a97
parent607f8ce74df9d5a4a7a3c65235909794cdc1d1d8
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
src/backend/utils/sort/logtape.c