From: Tom Lane <tgl@sss.pgh.pa.us>
To: mat@timescale.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15395: Assert failure when using CURRENT OF with inheritance
Date: Sun, 23 Sep 2018 16:06:43 -0400
Message-ID: <608.1537733203@sss.pgh.pa.us> (raw)
In-Reply-To: <25035.1537726091@sss.pgh.pa.us>
References: <153764171023.14986.280404050547008575@wrigleys.postgresql.org>
<25035.1537726091@sss.pgh.pa.us>
I wrote:
> I've not tried yet to create an actual test case for the chgParam-based
> failure. It's definitely possible that that problem is only hypothetical
> at the moment because cursor plans that would satisfy search_plan_tree
> would be too simple to contain any such flags. But I think we'd better
> add that logic anyway.
After fooling with that for awhile longer, indeed there doesn't seem to
be a way to cause such a failure today. The closest thing I was able
to find was that an InitPlan's output params could get marked for
recalculation, resulting in chgParam getting set on nodes that reference
the InitPlan. A cursor query could certainly contain an InitPlan ---
but there doesn't seem to be any code path that would result in forcing
recalculation of one, except with things that couldn't be in a simple
cursor plan, such as NestLoop joins. Still, it's not real hard to
conceive of future changes that would render this a live issue, so
I still feel that the search_plan_tree change is a good idea.
So, I've added a test case based on your example and pushed the patch.
BTW, I don't understand your report that just removing the Assert made
it work for you. That would've resulted in returning an invalid TID
to nodeTidscan.c, which AFAICS should've ended up with an ereport about
a bad block number in heap_fetch.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, mat@timescale.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15395: Assert failure when using CURRENT OF with inheritance
In-Reply-To: <608.1537733203@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