pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Amit Kapila <amit.kapila@enterprisedb.com>
Cc: David Rowley <david.rowley@2ndquadrant.com>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: ERROR: ORDER/GROUP BY expression not found in targetlist
Date: Sun, 26 Jun 2016 22:42:09 -0400
Message-ID: <20160627024209.GC1329944@tornado.leadboat.com> (raw)
In-Reply-To: <CA+TgmoZwJB9EaiBj-MEeAQ913WkKOz4aQ7VQnCfrDLs9WYhZdQ@mail.gmail.com>
References: <CAA4eK1Jm6HrJAPX26xyLGWes++r5=dOyOGRWeTa4q8NKd-UhVQ@mail.gmail.com>
	<CA+TgmobBRacuT1JRpG5kH0UZCL5XXKb7wEXhe7EcX9VQdqqWkA@mail.gmail.com>
	<15695.1465827695@sss.pgh.pa.us>
	<CA+kptmAGnsCOQR6LvfPpiF7iBN79No6jXpkvcCJ2v9GGbrtu2Q@mail.gmail.com>
	<17170.1465830165@sss.pgh.pa.us>
	<20756.1465834072@sss.pgh.pa.us>
	<1597.1465846969@sss.pgh.pa.us>
	<CA+TgmoZ7wvMPMTSNtk+dfDUNWmc8kK5pUtLDnzOLvJ9DVeAF_A@mail.gmail.com>
	<20391.1465850779@sss.pgh.pa.us>
	<CA+TgmoZwJB9EaiBj-MEeAQ913WkKOz4aQ7VQnCfrDLs9WYhZdQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On Mon, Jun 13, 2016 at 05:27:13PM -0400, Robert Haas wrote:
> One problem that I've realized that is related to this is that the way
> that the consider_parallel flag is being set for upper rels is almost
> totally bogus, which I believe accounts for your complaint at PGCon
> that force_parallel_mode was not doing as much as it ought to do.
> When I originally wrote a lot of this logic, there were no upper rels,
> which led to this code:
> 
>         if (force_parallel_mode == FORCE_PARALLEL_OFF || !glob->parallelModeOK)
>         {
>                 glob->parallelModeNeeded = false;
>                 glob->wholePlanParallelSafe = false;    /* either
> false or don't care */
>         }
>         else
>         {
>                 glob->parallelModeNeeded = true;
>                 glob->wholePlanParallelSafe =
>                         !has_parallel_hazard((Node *) parse, false);
>         }
> 
> The main way that wholePlanParallelSafe is supposed to be cleared is
> in create_plan:
> 
>         /* Update parallel safety information if needed. */
>         if (!best_path->parallel_safe)
>                 root->glob->wholePlanParallelSafe = false;
> 
> However, at the time that code was written, it was impossible to rely
> entirely on the latter mechanism.  Since there were no upper rels and
> no paths for upper plan nodes, you could have the case where every
> path was parallel-safe but the whole plan was node.  Therefore the
> code shown above was needed to scan the whole darned plan for
> parallel-unsafe things.  Post-pathification, this whole thing is
> pretty bogus: upper rels mostly don't get consider_parallel set at
> all, which means plans involving upper rels get marked parallel-unsafe
> even if they are not, which means the wholePlanParallelSafe flag gets
> cleared in a bunch of cases where it shouldn't.  And on the flip side
> I think that the first chunk of code quoted above would be totally
> unnecessary if we were actually setting consider_parallel correctly on
> the upper rels.

[Action required within 72 hours.  This is a generic notification.]

The above-described topic is currently a PostgreSQL 9.6 open item ("set
consider_parallel correctly for upper rels").  Robert, since you committed the
patch believed to have created it, you own this open item.  If some other
commit is more relevant or if this does not belong as a 9.6 open item, please
let us know.  Otherwise, please observe the policy on open item ownership[1]
and send a status update within 72 hours of this message.  Include a date for
your subsequent status update.  Testers may discover new open items at any
time, and I want to plan to get them all fixed well in advance of shipping
9.6rc1.  Consequently, I will appreciate your efforts toward speedy
resolution.  Thanks.

[1] http://www.postgresql.org/message-id/20160527025039.GA447393@tornado.leadboat.com


-- 
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 (66+ messages)  latest in thread

Message-ID: <20160627024209.GC1329944@tornado.leadboat.com>
Permalink:  ../20160627024209.GC1329944@tornado.leadboat.com/
Also on:    postgresql.org/message-id/20160627024209.GC1329944@tornado.leadboat.com

 · 

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: noah@leadboat.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, amit.kapila@enterprisedb.com, david.rowley@2ndquadrant.com, thomas.munro@enterprisedb.com
  Subject: Re: ERROR: ORDER/GROUP BY expression not found in targetlist
  In-Reply-To: <20160627024209.GC1329944@tornado.leadboat.com>
  References: <CAA4eK1Jm6HrJAPX26xyLGWes++r5=dOyOGRWeTa4q8NKd-UhVQ@mail.gmail.com> <CA+TgmobBRacuT1JRpG5kH0UZCL5XXKb7wEXhe7EcX9VQdqqWkA@mail.gmail.com> <15695.1465827695@sss.pgh.pa.us> <CA+kptmAGnsCOQR6LvfPpiF7iBN79No6jXpkvcCJ2v9GGbrtu2Q@mail.gmail.com> <17170.1465830165@sss.pgh.pa.us> <20756.1465834072@sss.pgh.pa.us> <1597.1465846969@sss.pgh.pa.us> <CA+TgmoZ7wvMPMTSNtk+dfDUNWmc8kK5pUtLDnzOLvJ9DVeAF_A@mail.gmail.com> <20391.1465850779@sss.pgh.pa.us> <CA+TgmoZwJB9EaiBj-MEeAQ913WkKOz4aQ7VQnCfrDLs9WYhZdQ@mail.gmail.com> <20160627024209.GC1329944@tornado.leadboat.com>

* 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