From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
Cc: | Peter Geoghegan <pg(at)heroku(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Claudio Freire <klaussfreire(at)gmail(dot)com> |
Subject: | Re: Logical tape pause/resume |
Date: | 2016-12-21 13:22:51 |
Message-ID: | CA+TgmoY+UuZe3tOiENxGXfgqBG7BOV9fQ_RhG62RVB6SxvA22A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Dec 21, 2016 at 7:25 AM, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
> For now, barring objections, I'm going to commit the first patch. It seems
> like a worthwhile simplification in any case, especially for Peter's
> Parallel tuplesort patch set.
Well, it removes more code than it adds. That's definitely something.
And saving memory per-empty-tape is good, too. A few random comments:
"seeked" is kind of a lame variable name. How about "seekpos" or
"newpos" or something like that?
/*
* Even in minimum memory, use at least a MINORDER merge. On the other
* hand, even when we have lots of memory, do not use more than a MAXORDER
- * merge. Tapes are pretty cheap, but they're not entirely free. Each
- * additional tape reduces the amount of memory available to build runs,
- * which in turn can cause the same sort to need more runs, which makes
- * merging slower even if it can still be done in a single pass. Also,
- * high order merges are quite slow due to CPU cache effects; it can be
- * faster to pay the I/O cost of a polyphase merge than to perform a single
- * merge pass across many hundreds of tapes.
+ * merge. Tapes are pretty cheap, but they're not entirely free.
High order
+ * merges are quite slow due to CPU cache effects; it can be faster to pay
+ * the I/O cost of a polyphase merge than to perform a single merge pass
+ * across many hundreds of tapes.
*/
I think you could leave this comment as-is. You haven't zeroed out
the overhead of a tape, and I like those additional bits I crammed in
there. :-)
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2016-12-21 13:23:41 | Re: Replication slot xmin is not reset if HS feedback is turned off while standby is shut down |
Previous Message | Fujii Masao | 2016-12-21 13:14:42 | Re: Measuring replay lag |