Re: BUG #15577: Query returns different results when executedmultiple times - Mailing list pgsql-bugs

From David Rowley
Subject Re: BUG #15577: Query returns different results when executedmultiple times
Date
Msg-id CAKJS1f_EJSk1h418K_Fsh+xm69=VLnFqXUP=0ZFtjNZTMaiBbA@mail.gmail.com
Whole thread Raw
In response to Re: BUG #15577: Query returns different results when executedmultiple times  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-bugs
On Thu, 10 Jan 2019 at 15:06, Robert Haas <robertmhaas@gmail.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


pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #15584: Erro ao iniciar o aplicativo
Next
From: Masahiko Sawada
Date:
Subject: Re: Is temporary functions feature official/supported? Found someissues with it.