pgsql: Simplify tape block format.

Lists: pgsql-committers
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: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
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(-)


From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
Cc: pgsql-committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Simplify tape block format.
Date: 2016-12-26 21:52:04
Message-ID: CAM3SWZRi8f8Wirw+d=yi8KjHNsu8aUs2h9xH7oYQNi-uViXAcA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-committers

On Thu, Dec 22, 2016 at 8:45 AM, Heikki Linnakangas
<heikki(dot)linnakangas(at)iki(dot)fi> wrote:
> Simplify tape block format.
>
> No more indirect blocks. The blocks form a linked list instead.

There is still one remaining reference to indirect blocks that you
missed in comments above LogicalTapeRewindForWrite().

--
Peter Geoghegan


From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: pgsql-committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Simplify tape block format.
Date: 2017-01-30 08:54:52
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-committers

On 12/26/2016 11:52 PM, Peter Geoghegan wrote:
> On Thu, Dec 22, 2016 at 8:45 AM, Heikki Linnakangas
> <heikki(dot)linnakangas(at)iki(dot)fi> wrote:
>> Simplify tape block format.
>>
>> No more indirect blocks. The blocks form a linked list instead.
>
> There is still one remaining reference to indirect blocks that you
> missed in comments above LogicalTapeRewindForWrite().

Thanks, fixed!

- Heikki