1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-29 10:41:53 +03:00

Allow a parallel context to relaunch workers.

This may allow some callers to avoid the overhead involved in tearing
down a parallel context and then setting up a new one, which means
releasing the DSM and then allocating and populating a new one.  I
suspect we'll want to revise the Gather node to make use of this new
capability, but even if not it may be useful elsewhere and requires
very little additional code.
This commit is contained in:
Robert Haas
2015-10-16 17:18:05 -04:00
parent afdfcd3f76
commit b0b0d84b3d
3 changed files with 55 additions and 0 deletions

View File

@ -35,6 +35,7 @@ typedef struct ParallelContext
dlist_node node;
SubTransactionId subid;
int nworkers;
int nworkers_launched;
parallel_worker_main_type entrypoint;
char *library_name;
char *function_name;