Re: Parallel tuplesort (for parallel B-Tree index creation)
Peter Geoghegan <pg@heroku.com>
On Wed, Oct 19, 2016 at 11:33 AM, Peter Geoghegan <pg@heroku.com> wrote: > I don't think that eager merging will prove all that effective, > however it's implemented. I see a very I/O bound system when parallel > CREATE INDEX merges serially. There is no obvious reason why you'd > have a straggler worker process with CREATE INDEX, really. In an effort to head off any misunderstanding around this patch series, I started a new Wiki page for it: https://wiki.postgresql.org/wiki/Parallel_External_Sort This talks about parallel CREATE INDEX in particular, and uses of parallel external sort more generally, including future uses beyond CREATE INDEX. This approach worked very well for me during the UPSERT project, where a detailed overview really helped. With UPSERT, it was particularly difficult to keep the *current* state of things straight, such as current open items for the patch, areas of disagreement, and areas where there was no longer any disagreement or controversy. I don't think that this patch is even remotely as complicated as UPSERT was, but it's still something that has had several concurrently active mailing list threads (threads that are at least loosely related to the project), so I think that this will be useful. I welcome anyone with an interest in this project to review the Wiki page, add their own concerns to it with -hackers citation, and add their own content around related work. There is a kind of unresolved question around where the Gather Merge work might fit in to what I've come up with aleady. There may be other unresolved questions like that, that I'm not even aware of. I commit to maintaining the new Wiki page as a useful starting reference for understanding the current state of this patch. I hope this makes looking into the patch series less intimidating for potential reviewers. -- Peter Geoghegan
Commits
-
Support parallel btree index builds.
- 9da0cc35284b 11.0 landed
-
Report an ERROR if a parallel worker fails to start properly.
- 2badb5afb89c 11.0 cited
-
Transfer state pertaining to pending REINDEX operations to workers.
- 29d58fd3adae 11.0 landed
-
Add a barrier primitive for synchronizing backends.
- 1145acc70deb 11.0 cited
-
Allow DML commands that create tables to use parallel query.
- e9baa5e9fa14 11.0 cited
-
Refactor GetOldestXmin() to use flags
- af4b1a0869bd 10.0 cited
-
Fix regression in parallel planning against inheritance tables.
- 2609e91fcf9d 10.0 cited
-
Don't create "holes" in BufFiles, in the new logtape code.
- 7ac4a389a7db 10.0 cited
-
Simplify the code for logical tape read buffers.
- b75f467b6eec 10.0 cited
-
Fix excessive memory consumption in the new sort pre-reading code.
- b56fb691b003 10.0 cited
-
Implement binary heap replace-top operation in a smarter way.
- 24598337c8d2 10.0 cited
-
Cosmetic code cleanup in commands/extension.c.
- 25794e841e5b 10.0 cited
-
Speed up planner's scanning for parallel-query hazards.
- da1c91631e35 10.0 cited
-
Read from the same worker repeatedly until it returns no tuple.
- bc7fcab5e36b 9.6.0 cited
-
Improve tuplesort.c to support variable merge order. The original coding
- df700e6b4019 8.2.0 cited