Re: Parallel tuplesort (for parallel B-Tree index creation)

Rushabh Lathia <rushabh.lathia@gmail.com>

From: Rushabh Lathia <rushabh.lathia@gmail.com>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>, Robert Haas <robertmhaas@gmail.com>, Heikki Linnakangas <hlinnaka@iki.fi>, Pg Hackers <pgsql-hackers@postgresql.org>, Corey Huinker <corey.huinker@gmail.com>
Date: 2017-10-10T09:23:41Z
Lists: pgsql-hackers

Attachments

On Sat, Sep 30, 2017 at 5:06 AM, Peter Geoghegan <pg@bowt.ie> wrote:

> On Wed, Sep 20, 2017 at 2:32 AM, Rushabh Lathia
> <rushabh.lathia@gmail.com> wrote:
> > Yes, I haven't touched the randomAccess part yet. My initial goal was
> > to incorporate the BufFileSet api's here.
>
> This is going to need a rebase, due to the commit today to remove
> replacement selection sort. That much should be easy.
>
>
Sorry for delay, here is rebase version of patch.


> > Sorry, I didn't get this part. Are you talking about the your patch
> changes
> > into OpenTemporaryFileInTablespace(),  BufFileUnify() and other changes
> > related to ltsUnify() ?  If that's the case, I don't think it require
> with
> > the
> > BufFileSet. Correct me if I am wrong here.
>
> I thought that you'd have multiple BufFiles, which would be
> multiplexed (much like a single BufFile itself mutiplexes 1GB
> segments), so that logtape.c could still recycle space in the
> randomAccess case. I guess that that's not a goal now.
>
>
Hmm okay.


> > To be frank its too early for me to comment anything in this area.  I
> need
> > to study this more closely. As an initial goal I was just focused on
> > understanding the current implementation of the patch and incorporate
> > the BufFileSet APIs.
>
> Fair enough.
>
>
Thanks,

-- 
Rushabh Lathia
www.EnterpriseDB.com

Commits

  1. Support parallel btree index builds.

  2. Report an ERROR if a parallel worker fails to start properly.

  3. Transfer state pertaining to pending REINDEX operations to workers.

  4. Add a barrier primitive for synchronizing backends.

  5. Allow DML commands that create tables to use parallel query.

  6. Refactor GetOldestXmin() to use flags

  7. Fix regression in parallel planning against inheritance tables.

  8. Don't create "holes" in BufFiles, in the new logtape code.

  9. Simplify the code for logical tape read buffers.

  10. Fix excessive memory consumption in the new sort pre-reading code.

  11. Implement binary heap replace-top operation in a smarter way.

  12. Cosmetic code cleanup in commands/extension.c.

  13. Speed up planner's scanning for parallel-query hazards.

  14. Read from the same worker repeatedly until it returns no tuple.

  15. Improve tuplesort.c to support variable merge order. The original coding