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 11:57:58 -0500
Message-ID: <4160.1515430678@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+Tgmoamc1jmdbyaLSfVi5-_YqcpB-75dWCu2DjP9nivLrS-nQ@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>

Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Jan 8, 2018 at 11:42 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> More generally, I wonder if
>> it wouldn't be better to implement this behavior at runtime rather
>> than plan time.

> Ignoring some details around partial vs. non-partial plans, that's
> pretty much what we ARE doing, but to make it efficient, we sort the
> paths at plan time so that those choices are easy to make at runtime.
> If we didn't do that, we could have every worker sort the paths at
> execution time instead, or have the first process to arrive perform
> the sort and store the results in shared memory while everyone else
> waits, but that seems to be more complicated and less efficient, so I
> don't understand why you're proposing it.

The main bit of info we'd have at runtime that we lack at plan time is
certainty about the number of available workers.  Maybe that doesn't
really add anything useful to the order in which subplans would be doled
out; not sure.

			regards, tom lane




view thread (22+ messages)  latest in thread

Message-ID: <4160.1515430678@sss.pgh.pa.us>
Permalink:  ../4160.1515430678@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4160.1515430678@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: <4160.1515430678@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>

* 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