Re: search_plan_tree(): handling of non-leaf CustomScanState nodes causes segfault

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zhihong Yu <zyu(at)yugabyte(dot)com>
Cc: David Geier <david(at)swarm64(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: search_plan_tree(): handling of non-leaf CustomScanState nodes causes segfault
Date: 2021-01-18 21:13:28
Message-ID: 412418.1611004408@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zhihong Yu <zyu(at)yugabyte(dot)com> writes:
> I was thinking that, if sstate->ss_currentRelation is null for the other
> cases, that would be a bug.
> An assertion can be added for the cases ending with T_TidScanState.

Maybe, but there are surely a lot of other places that would crash
in such a case --- places far more often traversed than search_plan_tree.
I do not see any value in complicating search_plan_tree for that.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Geier 2021-01-18 21:32:12 Re: search_plan_tree(): handling of non-leaf CustomScanState nodes causes segfault
Previous Message Victor Yegorov 2021-01-18 21:10:08 Re: Deleting older versions in unique indexes to avoid page splits