pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Jim Finnerty <jfinnert@amazon.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Parallel append plan instability/randomness
Date: Mon, 08 Jan 2018 13:11:15 -0500
Message-ID: <7733.1515435075@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoZrsb8Qp72fK=cO-53WoitZY+hR9tbBiTTXk6qudjugJw@mail.gmail.com>
References: <7752.1515284083@sss.pgh.pa.us>
	<CAA4eK1LegxN9of0sydNM5n4up=7oCj=-E94edKDOsYFKyb1R0Q@mail.gmail.com>
	<CAJ3gD9cT-u3xjAh0vkZX0wknZkWFp8sgOuWgDcRn68vy-j-wHg@mail.gmail.com>
	<7400.1515390981@sss.pgh.pa.us>
	<CAA4eK1JHbp2uEvmBVv7JRdCFznG9zWVy6aBB0-8arxZm4P-4hg@mail.gmail.com>
	<CAJ3gD9cSKj-OioojVOf3_QTB8gK=dqU1JGYEjW1WXbLVxuAeXA@mail.gmail.com>
	<CAA4eK1Kxpw4_UXpT0NUWF7zY6_kLxTU9Km9Ebfhc4No3kr40NQ@mail.gmail.com>
	<1515428895102-0.post@n3.nabble.com>
	<2171.1515429722@sss.pgh.pa.us>
	<CA+Tgmoamc1jmdbyaLSfVi5-_YqcpB-75dWCu2DjP9nivLrS-nQ@mail.gmail.com>
	<4160.1515430678@sss.pgh.pa.us>
	<CA+TgmoZrsb8Qp72fK=cO-53WoitZY+hR9tbBiTTXk6qudjugJw@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> [ example where current parallel-append dispatch algorithm loses ]

I should clarify my thinking a bit more: I was imagining that we might
switch to a system where, as each worker comes free, it makes a dynamic
choice of which subplan to take next.  That means that not only do we have
more knowledge of the number of available workers than the planner did,
but we also have hard knowledge of which subplans actually finished first.
So even (or especially?) granted that the cost estimates are imperfect,
that might provide a leg up in choosing how to schedule the remaining
tasks.

I haven't thought about it hard enough to have a clear idea of how that
might win.  But for sure I don't think we should dismiss out of hand
the idea that it could be better than choosing a fixed dispatch order
at plan time.

Anyway, I'm merely suggesting that as an approach worth investigating in
future research; I doubt anyone is going to produce an implementation
right away.  So we still want to figure out exactly what happened on
silverfish and how we can nail down that expected plan shape.  (Or,
perhaps, decide that we don't need to see that plan in the output?)

			regards, tom lane




view thread (22+ messages)  latest in thread

Message-ID: <7733.1515435075@sss.pgh.pa.us>
Permalink:  ../7733.1515435075@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7733.1515435075@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, robertmhaas@gmail.com, jfinnert@amazon.com
  Subject: Re: Parallel append plan instability/randomness
  In-Reply-To: <7733.1515435075@sss.pgh.pa.us>
  References: <7752.1515284083@sss.pgh.pa.us> <CAA4eK1LegxN9of0sydNM5n4up=7oCj=-E94edKDOsYFKyb1R0Q@mail.gmail.com> <CAJ3gD9cT-u3xjAh0vkZX0wknZkWFp8sgOuWgDcRn68vy-j-wHg@mail.gmail.com> <7400.1515390981@sss.pgh.pa.us> <CAA4eK1JHbp2uEvmBVv7JRdCFznG9zWVy6aBB0-8arxZm4P-4hg@mail.gmail.com> <CAJ3gD9cSKj-OioojVOf3_QTB8gK=dqU1JGYEjW1WXbLVxuAeXA@mail.gmail.com> <CAA4eK1Kxpw4_UXpT0NUWF7zY6_kLxTU9Km9Ebfhc4No3kr40NQ@mail.gmail.com> <1515428895102-0.post@n3.nabble.com> <2171.1515429722@sss.pgh.pa.us> <CA+Tgmoamc1jmdbyaLSfVi5-_YqcpB-75dWCu2DjP9nivLrS-nQ@mail.gmail.com> <4160.1515430678@sss.pgh.pa.us> <CA+TgmoZrsb8Qp72fK=cO-53WoitZY+hR9tbBiTTXk6qudjugJw@mail.gmail.com> <7733.1515435075@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