Re: Parallel Sort

From: Noah Misch <noah(at)leadboat(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Parallel Sort
Date: 2013-05-16 13:46:10
Message-ID: 20130516134610.GA256158@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 15, 2013 at 08:49:00PM +0200, Andres Freund wrote:
> On 2013-05-13 10:28:59 -0400, Noah Misch wrote:
> > Each worker needs to make SnapshotNow visibility decisions coherent with the
> > master. For sorting, this allows us to look up comparison functions, even
> > when the current transaction created or modified those functions. This will
> > also be an essential building block for any parallelism project that consults
> > user tables. Implementing this means copying the subtransaction stack and the
> > combocid hash to each worker. For the sake of completeness, we should also
> > copy the global MVCC snapshot data (sorting probably won't care). It also
> > means forbidding, while a parallel task is in flight, operations that affect
> > the transaction state:
>
> Btw, if you assume you can simply copy a snapshot from the normal
> backend to the worker backend to make visibility decisions in the
> general case: You're wrong. Unfortunately you need in-memory state to
> make sense of combocids...

Correct. If you think of any required state information that I did not list
above, please let me know.

--
Noah Misch
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message 'Bruce Momjian' 2013-05-16 13:47:21 Re: 9.3 Beta1 status report
Previous Message Kevin Grittner 2013-05-16 13:32:14 Re: counting algorithm for incremental matview maintenance