pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Zhihong Yu <zyu@yugabyte.com>
Cc: David Geier <david@swarm64.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: search_plan_tree(): handling of non-leaf CustomScanState nodes causes segfault
Date: Mon, 18 Jan 2021 16:13:28 -0500
Message-ID: <412418.1611004408@sss.pgh.pa.us> (raw)
In-Reply-To: <CALNJ-vQoKAtKsbKFHDgvAo5o+EGv7yGFiUjzY4sLA+imkzfJ+A@mail.gmail.com>
References: <0253344d-9bdd-11c4-7f0d-d88c02cd7991@swarm64.com>
	<347100.1610995608@sss.pgh.pa.us>
	<CALNJ-vRRwwqKuSvWJNdHG7Six0ZBt=LDVdrFfSitStuKHbjUkg@mail.gmail.com>
	<389041.1611000954@sss.pgh.pa.us>
	<CALNJ-vQoKAtKsbKFHDgvAo5o+EGv7yGFiUjzY4sLA+imkzfJ+A@mail.gmail.com>

Zhihong Yu <zyu@yugabyte.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





view thread (13+ messages)  latest in thread

Message-ID: <412418.1611004408@sss.pgh.pa.us>
Permalink:  ../412418.1611004408@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/412418.1611004408@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, zyu@yugabyte.com, david@swarm64.com
  Subject: Re: search_plan_tree(): handling of non-leaf CustomScanState nodes causes segfault
  In-Reply-To: <412418.1611004408@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox