Re: About tapes - Mailing list pgsql-hackers

From Tom Lane
Subject Re: About tapes
Date
Msg-id 17176.1276889833@sss.pgh.pa.us
Whole thread Raw
In response to Re: About tapes  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Jun 18, 2010 at 3:11 PM, mac_man2005@hotmail.it
> <mac_man2005@hotmail.it> wrote:
>> I repeat my question. Tuplesort.c and logtape.c DO implement tapes on disk
>> and currently they do not request 2x or 4x of the input space: so, again, in
>> which case implementing tapes on disks requires between 2x and 4x of input
>> space?

> I think that the comment is saying that it *would* take 2x or 4x the
> input space IF we created a separate file for each input.  So instead
> we don't.

The point of the comment (and indeed of the whole module) is that if we
don't want peak space usage to be at least twice the data volume, we
have to recycle the space used by "input tapes" before the tapes have
been fully read.  There's no way to do that if each "tape" is an
independent operating-system file.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: extensible enum types
Next
From: "mac_man2005@hotmail.it"
Date:
Subject: Re: About tapes