Implementing parallel sequence doubts

From: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Implementing parallel sequence doubts
Date: 2014-08-21 05:59:16
Message-ID: CAJrrPGcu2YEazNdaY=kupXQsPCrHisUfO15VsWLLKqfnT-tKNQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Hackers,

Implementation of "Parallel Sequence Scan"

Approach:

1."Parallel Sequence Scan" can achieved by using the background
workers doing the job of actual sequence scan including the
qualification check also.

2. Planner generates the parallel scan plan by checking the possible
criteria of the table to do a parallel scan and generates the tasks
(range of blocks).

3. In the executor Init phase, Try to copy the necessary data required
by the workers and start the workers.

4. In the executor run phase, just get the tuples which are sent by
the workers and process them further in the plan node execution.

some of the problems i am thinking:

1. Data structures that are required to be copied from backend to
worker are currentTransactionState, Snapshot, GUC, ComboCID, Estate
and etc.

I see some problems in copying "Estate" data structure into the shared
memory because it contains so many pointers. There is a need of some
infrastructure to copy these data structures into the shared memory.

If the backend takes care of locking the relation and there are no sub
plans involved in the qual and targetlist, is the estate is really
required in the worker to achieve the parallel scan?

Is it possible to Initialize the qual, targetlist and projinfo with
the local "Estate" structure created in the worker with the help of
"plan" structure received from the backend?

Or

In case if "estate" is required in the worker for the processing, is
there any better way possible to share backend data structures with
the workers?

Any suggestions?

Regards,
Hari Babu
Fujitsu Australia

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2014-08-21 06:32:36 Re: WIP Patch for GROUPING SETS phase 1
Previous Message furuyao 2014-08-21 05:54:17 Re: pg_receivexlog --status-interval add fsync feedback