mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Allow asynchronous execution in more cases.
In commit 27e1f1456, create_append_plan() only allowed the subplan
created from a given subpath to be executed asynchronously when it was
an async-capable ForeignPath. To extend coverage, this patch handles
cases when the given subpath includes some other Path types as well that
can be omitted in the plan processing, such as a ProjectionPath directly
atop an async-capable ForeignPath, allowing asynchronous execution in
partitioned-scan/partitioned-join queries with non-Var tlist expressions
and more UNION queries.
Andrey Lepikhov and Etsuro Fujita, reviewed by Alexander Pyhalov and
Zhihong Yu.
Discussion: https://postgr.es/m/659c37a8-3e71-0ff2-394c-f04428c76f08%40postgrespro.ru
This commit is contained in:
@@ -632,6 +632,7 @@ _copySubqueryScan(const SubqueryScan *from)
|
||||
* copy remainder of node
|
||||
*/
|
||||
COPY_NODE_FIELD(subplan);
|
||||
COPY_SCALAR_FIELD(scanstatus);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
||||
@@ -638,6 +638,7 @@ _outSubqueryScan(StringInfo str, const SubqueryScan *node)
|
||||
_outScanInfo(str, (const Scan *) node);
|
||||
|
||||
WRITE_NODE_FIELD(subplan);
|
||||
WRITE_ENUM_FIELD(scanstatus, SubqueryScanStatus);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -2194,6 +2194,7 @@ _readSubqueryScan(void)
|
||||
ReadCommonScan(&local_node->scan);
|
||||
|
||||
READ_NODE_FIELD(subplan);
|
||||
READ_ENUM_FIELD(scanstatus, SubqueryScanStatus);
|
||||
|
||||
READ_DONE();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user