]> granicus.if.org Git - postgresql/commit
Simplify tape block format.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 22 Dec 2016 16:45:00 +0000 (18:45 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 22 Dec 2016 16:45:00 +0000 (18:45 +0200)
commit01ec25631fe0eae6af67c29c61a358dc6b92ed3c
tree36f4d174b81394546cb8c7c173d1e58617491321
parentb86515da1a73d0a2e23aca728f18b5f9e809e89f
Simplify tape block format.

No more indirect blocks. The blocks form a linked list instead.

This saves some memory, because we don't need to have a buffer in memory to
hold the indirect block (or blocks). To reflect that, TAPE_BUFFER_OVERHEAD
is reduced from 3 to 1 buffer, which allows using more memory for building
the initial runs.

Reviewed by Peter Geoghegan and Robert Haas.

Discussion: https://www.postgresql.org/message-id/34678beb-938e-646e-db9f-a7def5c44ada%40iki.fi
src/backend/utils/sort/logtape.c
src/backend/utils/sort/tuplesort.c
src/include/utils/logtape.h