pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Andreas Seltenreich <seltenreich@gmx.de>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [sqlsmith] Crash in apply_projection_to_path
Date: Sat, 30 Apr 2016 12:32:39 -0400
Message-ID: <20535.1462033959@sss.pgh.pa.us> (raw)
In-Reply-To: <CAA4eK1JchgDyx90KT3eBO1et8c+mG5neSyXV+0NPQv0Ft5CnVw@mail.gmail.com>
References: <871t5pgwdt.fsf@credativ.de>
	<20754.1461895587@sss.pgh.pa.us>
	<CA+Tgmob3v2EMpjv2NuCt6aanB4HJAiNJ+=G0uqH3C4qdJL96aQ@mail.gmail.com>
	<CAA4eK1J-JtJi9dZ+iCFp813OyOWMMtY-eT0HmFdYznn=AFm5YA@mail.gmail.com>
	<13430.1461938599@sss.pgh.pa.us>
	<CAA4eK1JchgDyx90KT3eBO1et8c+mG5neSyXV+0NPQv0Ft5CnVw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Amit Kapila <amit.kapila16@gmail.com> writes:
> On Fri, Apr 29, 2016 at 7:33 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> make_join_rel is certainly not far enough down the call stack to solve
>> this problem.  It can, and typically will, be invoked multiple times
>> for the same target join relation.
>> 
>> One possible answer is to do it in standard_join_search, just before
>> the set_cheapest call for each join relation.

> Yes, that makes sense to me.

Done that way.

> Yet, another idea could be to create a copy of partial path before passing
> it to create_gather_path()?

That's just a kluge, and I'm not exactly convinced it'd solve the problem
anyway, unless you wanted to recursively copy the entire infrastructure
of the partial path.  What's needed is to set rules for how we build paths
up in an orderly fashion.  Such rules already existed for regular paths
(see the comments I added in c45bf5751), and now they exist for parallel
paths as well.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (7+ messages)

Message-ID: <20535.1462033959@sss.pgh.pa.us>
Permalink:  ../20535.1462033959@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20535.1462033959@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, amit.kapila16@gmail.com, robertmhaas@gmail.com, seltenreich@gmx.de
  Subject: Re: [sqlsmith] Crash in apply_projection_to_path
  In-Reply-To: <20535.1462033959@sss.pgh.pa.us>
  References: <871t5pgwdt.fsf@credativ.de> <20754.1461895587@sss.pgh.pa.us> <CA+Tgmob3v2EMpjv2NuCt6aanB4HJAiNJ+=G0uqH3C4qdJL96aQ@mail.gmail.com> <CAA4eK1J-JtJi9dZ+iCFp813OyOWMMtY-eT0HmFdYznn=AFm5YA@mail.gmail.com> <13430.1461938599@sss.pgh.pa.us> <CAA4eK1JchgDyx90KT3eBO1et8c+mG5neSyXV+0NPQv0Ft5CnVw@mail.gmail.com> <20535.1462033959@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