From: | Thomas Munro <tmunro(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Fix estimates for ModifyTable paths without RETURNING. |
Date: | 2020-10-12 11:27:40 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix estimates for ModifyTable paths without RETURNING.
In the past, we always estimated that a ModifyTable node would emit the
same number of rows as its subpaths. Without a RETURNING clause, the
correct estimate is zero. Fix, in preparation for a proposed parallel
write patch that is sensitive to that number.
A remaining problem is that for RETURNING queries, the estimated width
is based on subpath output rather than the RETURNING tlist.
Reviewed-by: Greg Nancarrow <gregn4422(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAJcOf-cXnB5cnMKqWEp2E2z7Mvcd04iLVmV%3DqpFJrR3AcrTS3g%40mail.gmail.com
Branch
------
master
Modified Files
--------------
src/backend/optimizer/util/pathnode.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2020-10-12 11:35:36 | pgsql: Fix compilation warning in unicode_norm.c |
Previous Message | Peter Eisentraut | 2020-10-12 06:03:51 | pgsql: Adjust cycle detection examples and tests |