pgsql: Fix estimates for ModifyTable paths without RETURNING. - Mailing list pgsql-committers

From Thomas Munro
Subject pgsql: Fix estimates for ModifyTable paths without RETURNING.
Date
Msg-id E1kRvzQ-0000Wh-6V@gemulon.postgresql.org
Whole thread Raw
List 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@gmail.com>
Discussion: https://postgr.es/m/CAJcOf-cXnB5cnMKqWEp2E2z7Mvcd04iLVmV%3DqpFJrR3AcrTS3g%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f0f13a3a08b2757997410f3a1c38bdc22973c525

Modified Files
--------------
src/backend/optimizer/util/pathnode.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Adjust cycle detection examples and tests
Next
From: Michael Paquier
Date:
Subject: pgsql: Fix compilation warning in unicode_norm.c