mirror of
https://github.com/postgres/postgres.git
synced 2025-11-28 11:44:57 +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:
@@ -221,3 +221,8 @@ pattern looks like this:
|
||||
DestroyParallelContext(pcxt);
|
||||
|
||||
ExitParallelMode();
|
||||
|
||||
If desired, after WaitForParallelWorkersToFinish() has been called, another
|
||||
call to LaunchParallelWorkers() can be made using the same parallel context.
|
||||
Calls to these two functions can be alternated any number of times before
|
||||
destroying the parallel context.
|
||||
|
||||
Reference in New Issue
Block a user