Re: memory leak in e94568ecc10 (pre-reading in external sort) - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: memory leak in e94568ecc10 (pre-reading in external sort)
Date
Msg-id CAM3SWZTGkT_2B_3uG0n3XtDjTEY10QLrgkqUf8x4Vms3pODkxw@mail.gmail.com
Whole thread Raw
In response to Re: memory leak in e94568ecc10 (pre-reading in external sort)  (Peter Geoghegan <pg@heroku.com>)
List pgsql-hackers
On Thu, Oct 6, 2016 at 8:44 AM, Peter Geoghegan <pg@heroku.com> wrote:
> Besides, what I propose to do is really exactly the same as what you
> also want to do, except it avoids actually changing state->maxTapes.
> We'd just pass down what you propose to assign to state->maxTapes
> directly, which differs (and not just in the common case where there
> are inactive tapes -- it's always at least off-by-one). Right?

What I mean is that you should pass down numTapes alongside
numInputTapes. The function init_tape_buffers() could either have an
additional argument (numTapes), or derive numTapes itself.


-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Fast AT ADD COLUMN with DEFAULTs
Next
From: Serge Rielau
Date:
Subject: Re: Fast AT ADD COLUMN with DEFAULTs