Re: About tapes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "mac_man2005(at)hotmail(dot)it" <mac_man2005(at)hotmail(dot)it>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: About tapes
Date: 2010-06-18 19:37:13
Message-ID: 17176.1276889833@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Fri, Jun 18, 2010 at 3:11 PM, mac_man2005(at)hotmail(dot)it
> <mac_man2005(at)hotmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message mac_man2005@hotmail.it 2010-06-18 19:46:35 Re: About tapes
Previous Message Tom Lane 2010-06-18 19:18:51 Re: extensible enum types