pgsql: Fix EXPLAIN of SEARCH BREADTH FIRST queries some more.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix EXPLAIN of SEARCH BREADTH FIRST queries some more.
Date: 2021-10-11 15:57:06
Message-ID: E1mZxfm-0002o9-9K@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix EXPLAIN of SEARCH BREADTH FIRST queries some more.

Commit 3f50b8263 had an oversight: formerly, to deparse expressions
attached to a plan node, it was only necessary to update the
deparse_namespace ancestors list alongside calling set_deparse_plan.
Now it's necessary to update the ancestors list *first*, because
set_deparse_plan consults it, and one call site got that wrong.

This error was masked in most cases because explain.c uses just one
List object for the ancestors list, updating it in-place as the plan
is scanned, so that we accidentally had the right List assigned to
dpns->ancestors before it was needed. It would fail only if a
WorkTableScan node were the first one that we tried to deparse a
subexpression of.

Per report from Markus Winand. Like the previous patch,
back-patch to v14.

Discussion: https://postgr.es/m/648B0505-AA57-42C2-A2DA-E551DE46FA15@winand.at

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2c25db32eedb9696c4b900c70ebef03683babf24

Modified Files
--------------
src/backend/utils/adt/ruleutils.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2021-10-11 20:54:27 Re: pgsql: Adjust configure to insist on Perl version >= 5.8.3.
Previous Message Tom Lane 2021-10-11 15:03:35 Re: pgsql: Adjust configure to insist on Perl version >= 5.8.3.