We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eed717b commit b055cd1Copy full SHA for b055cd1
src/storage/postgres_optimizer.cpp
@@ -54,6 +54,11 @@ static void OptimizePostgresScanLimitPushdown(unique_ptr<LogicalOperator> &op) {
54
}
55
56
auto &bind_data = get.bind_data->Cast<PostgresBindData>();
57
+ if (bind_data.max_threads != 1 || !bind_data.can_use_main_thread) {
58
+ // cannot push down limit/offset if we are not using the main thread
59
+ OptimizePostgresScanLimitPushdown(op->children[0]);
60
+ return;
61
+ }
62
63
string generated_limit_clause = "";
64
if (limit.limit_val.Type() != LimitNodeType::UNSET) {
0 commit comments