pgsql: Simplify tape block format.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Simplify tape block format.
Date: 2016-12-22 16:45:47
Message-ID: E1cK6V1-0000Io-QY@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/01ec25631fe0eae6af67c29c61a358dc6b92ed3c

Modified Files
--------------
src/backend/utils/sort/logtape.c | 627 +++++++++++--------------------------
src/backend/utils/sort/tuplesort.c | 65 ++--
src/include/utils/logtape.h | 4 +-
3 files changed, 218 insertions(+), 478 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Joe Conway 2016-12-22 17:20:50 pgsql: Protect dblink from invalid options when using postgres_fdw serv
Previous Message Tom Lane 2016-12-22 16:19:35 pgsql: Give a useful error message if uuid-ossp is built without precon