Re: BUG #15577: Query returns different results when executed multiple times

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Bartosz Polnik <bartoszpolnik(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #15577: Query returns different results when executed multiple times
Date: 2019-01-10 02:29:12
Message-ID: CAKJS1f_EJSk1h418K_Fsh+xm69=VLnFqXUP=0ZFtjNZTMaiBbA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, 10 Jan 2019 at 15:06, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> As to disallow "this plan shape," both leader participation and the
> ability to generate this kind of plan are there because they improve
> performance substantially on some queries. I put a heck of a lot of
> energy into being able to parallelize only part of a query, and into
> allowing for leader participation, and I believe those things make a
> real difference.

I 100% agree that this shape of plan is useful. I guess though, that
whether we keep allowing it or not depends on if a suitable fix
appears for the issue.

One idea that I've been thinking about is some sort of param context
number that we bump during createplan when we encounter a
Gather/GatherMerge path and have assign_param_for_var() pay attention
to that number when deciding if sharing a parameter is okay. How
exactly that context number is calculated and how we pass the value
around I've currently no idea, so please consider this very handwavy.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Masahiko Sawada 2019-01-10 02:47:32 Re: Is temporary functions feature official/supported? Found some issues with it.
Previous Message PG Bug reporting form 2019-01-10 02:12:54 BUG #15584: Erro ao iniciar o aplicativo