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: Amit Kapila <amit.kapila16@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Parallel append plan instability/randomness
Date: Mon, 08 Jan 2018 14:50:27 -0500
Message-ID: <14123.1515441027@sss.pgh.pa.us> (raw)
In-Reply-To: <12879.1515439091@sss.pgh.pa.us>
References: <7752.1515284083@sss.pgh.pa.us>
	<CAA4eK1LegxN9of0sydNM5n4up=7oCj=-E94edKDOsYFKyb1R0Q@mail.gmail.com>
	<CA+TgmoaAWXyFUY1BgkYcH3DE4Xrot1qPgAOLW2Gj8OgQOVNg0w@mail.gmail.com>
	<12879.1515439091@sss.pgh.pa.us>

I wrote:
> In the regression test case at hand, the startup costs are all zero so
> this change wouldn't improve the test case's stability.  So I'm thinking
> that in addition, it would be a good idea for these functions to break
> exact compare_path_costs ties in some arbitrary but deterministic way,
> rather than letting qsort() have the final say on what happens.  If the
> subplans were all simple relation scans we could order them by planner
> relid, but I'm not sure what to do if they're not.

Ah, I have an idea --- let's create a bms_compare() qsort comparator for
bitmapsets, and use that on the paths' relid sets.  It hardly matters
what the exact semantics of the comparator are, as long as it behaves
sanely for equal sets.

			regards, tom lane




view thread (22+ messages)  latest in thread

Message-ID: <14123.1515441027@sss.pgh.pa.us>
Permalink:  ../14123.1515441027@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14123.1515441027@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, amit.kapila16@gmail.com
  Subject: Re: Parallel append plan instability/randomness
  In-Reply-To: <14123.1515441027@sss.pgh.pa.us>
  References: <7752.1515284083@sss.pgh.pa.us> <CAA4eK1LegxN9of0sydNM5n4up=7oCj=-E94edKDOsYFKyb1R0Q@mail.gmail.com> <CA+TgmoaAWXyFUY1BgkYcH3DE4Xrot1qPgAOLW2Gj8OgQOVNg0w@mail.gmail.com> <12879.1515439091@sss.pgh.pa.us> <14123.1515441027@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