| From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
|---|---|
| To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
| Cc: | Peter Geoghegan <pg(at)heroku(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Corey Huinker <corey(dot)huinker(at)gmail(dot)com> |
| Subject: | Re: Parallel tuplesort (for parallel B-Tree index creation) |
| Date: | 2016-09-22 19:57:46 |
| Message-ID: | CA+TgmoZHRwBm5WtdSy8KzsFdwJtYFXxBSLJgE8dQ-DSPuF8WeA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Sep 22, 2016 at 3:51 PM, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
> It'd be good if you could overlap the final merges in the workers with the
> merge in the leader. ISTM it would be quite straightforward to replace the
> final tape of each worker with a shared memory queue, so that the leader
> could start merging and returning tuples as soon as it gets the first tuple
> from each worker. Instead of having to wait for all the workers to complete
> first.
If you do that, make sure to have the leader read multiple tuples at a
time from each worker whenever possible. It makes a huge difference
to performance. See bc7fcab5e36b9597857fa7e3fa6d9ba54aaea167.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Dunstan | 2016-09-22 21:56:53 | pg_upgrade vs user created range type extension |
| Previous Message | Heikki Linnakangas | 2016-09-22 19:51:51 | Re: Parallel tuplesort (for parallel B-Tree index creation) |