pgsql: Create an infrastructure for parallel computation in PostgreSQL.

Started by Robert Haasabout 11 years ago3 messagescomitters
Jump to latest
#1Robert Haas
robertmhaas@gmail.com

Create an infrastructure for parallel computation in PostgreSQL.

This does four basic things. First, it provides convenience routines
to coordinate the startup and shutdown of parallel workers. Second,
it synchronizes various pieces of state (e.g. GUCs, combo CID
mappings, transaction snapshot) from the parallel group leader to the
worker processes. Third, it prohibits various operations that would
result in unsafe changes to that state while parallelism is active.
Finally, it propagates events that would result in an ErrorResponse,
NoticeResponse, or NotifyResponse message being sent to the client
from the parallel workers back to the master, from which they can then
be sent on to the client.

Robert Haas, Amit Kapila, Noah Misch, Rushabh Lathia, Jeevan Chalke.
Suggestions and review from Andres Freund, Heikki Linnakangas, Noah
Misch, Simon Riggs, Euler Taveira, and Jim Nasby.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/924bcf4f16d54c55310b28f77686608684734f42

Modified Files
--------------
contrib/postgres_fdw/connection.c | 3 +
src/backend/access/heap/heapam.c | 55 ++
src/backend/access/transam/Makefile | 2 +-
src/backend/access/transam/README.parallel | 223 ++++++
src/backend/access/transam/parallel.c | 1007 ++++++++++++++++++++++++++++
src/backend/access/transam/varsup.c | 7 +
src/backend/access/transam/xact.c | 486 +++++++++++++-
src/backend/access/transam/xlog.c | 8 +
src/backend/catalog/namespace.c | 11 +-
src/backend/commands/copy.c | 3 +-
src/backend/commands/sequence.c | 14 +
src/backend/executor/execMain.c | 30 +-
src/backend/executor/functions.c | 3 +
src/backend/executor/spi.c | 32 +-
src/backend/libpq/pqmq.c | 33 +-
src/backend/postmaster/bgworker.c | 50 ++
src/backend/storage/ipc/procarray.c | 44 ++
src/backend/storage/ipc/procsignal.c | 4 +
src/backend/storage/lmgr/predicate.c | 8 +
src/backend/tcop/postgres.c | 4 +-
src/backend/tcop/utility.c | 30 +-
src/backend/utils/adt/lockfuncs.c | 30 +
src/backend/utils/fmgr/dfmgr.c | 54 ++
src/backend/utils/misc/guc.c | 23 +
src/backend/utils/time/combocid.c | 74 ++
src/backend/utils/time/snapmgr.c | 210 +++++-
src/include/access/parallel.h | 68 ++
src/include/access/xact.h | 11 +
src/include/catalog/namespace.h | 2 +-
src/include/fmgr.h | 3 +
src/include/libpq/pqmq.h | 1 +
src/include/miscadmin.h | 1 +
src/include/postmaster/bgworker.h | 2 +
src/include/storage/procarray.h | 1 +
src/include/storage/procsignal.h | 1 +
src/include/utils/combocid.h | 3 +
src/include/utils/snapmgr.h | 5 +
37 files changed, 2499 insertions(+), 47 deletions(-)

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Robert Haas (#1)
Re: pgsql: Create an infrastructure for parallel computation in PostgreSQL.

On 4/30/15 3:22 PM, Robert Haas wrote:

Create an infrastructure for parallel computation in PostgreSQL.

Could you rename ParallelContext.private to something that doesn't
conflict with C++?

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#3Robert Haas
robertmhaas@gmail.com
In reply to: Peter Eisentraut (#2)
Re: pgsql: Create an infrastructure for parallel computation in PostgreSQL.

On Tue, May 5, 2015 at 8:12 PM, Peter Eisentraut <peter_e@gmx.net> wrote:

On 4/30/15 3:22 PM, Robert Haas wrote:

Create an infrastructure for parallel computation in PostgreSQL.

Could you rename ParallelContext.private to something that doesn't
conflict with C++?

Sure, done.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers