From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Andreas Seltenreich <seltenreich@gmx.de>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Robert Haas <robertmhaas@gmail.com>
Subject: Re: [sqlsmith] ERROR: badly formatted node string "RESTRICTINFO...
Date: Wed, 12 Apr 2017 13:00:37 -0400
Message-ID: <18988.1492016437@sss.pgh.pa.us> (raw)
In-Reply-To: <CAA4eK1+dnAMZGKuWF8zEDtP7ZJf2G0kYgtHQgskkNM=D+7shsA@mail.gmail.com>
References: <87tw5x4vcu.fsf@credativ.de>
<11668.1491753112@sss.pgh.pa.us>
<9631.1491863013@sss.pgh.pa.us>
<23397.1491868771@sss.pgh.pa.us>
<CAA4eK1JnorHn3xBqwX408NVS2KCKyxuzuEqS+Dsgw_LXS8wHgw@mail.gmail.com>
<30972.1491937807@sss.pgh.pa.us>
<CAA4eK1+dnAMZGKuWF8zEDtP7ZJf2G0kYgtHQgskkNM=D+7shsA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Amit Kapila <amit.kapila16@gmail.com> writes:
> On Wed, Apr 12, 2017 at 12:40 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Anyone want to draft a patch for this?
> Please find patch attached based on above discussion.
This patch seems fairly incomplete: you can't just whack around major data
structures like PlannedStmt and PlannerGlobal without doing the janitorial
work of cleaning up support logic such as outfuncs/readfuncs.
Also, when you think about what will happen when doing a copyObject()
on a completed plan, it seems like a pretty bad idea to link subplans
into two independent lists. We'll end up with two separate copies of
those subtrees in places like the plan cache.
I'm inclined to think the other approach of adding a parallel_safe
flag to struct Plan is a better answer in the long run. It's basically
free to have it there because of alignment considerations, and it's
hard to believe that we're not going to need that labeling at some
point in the future anyway.
I had been a bit concerned about having to have some magic in outfuncs
and/or readfuncs to avoid transferring the unsafe subplan(s), but I see
from your patch there's a better way: we can have ExecSerializePlan modify
the subplan list as it transfers it into its private PlannedStmt struct.
But I think iterating over the list and examining each subplan's
parallel_safe marking is a better way to do that.
Will work on this approach.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, amit.kapila16@gmail.com, seltenreich@gmx.de, robertmhaas@gmail.com
Subject: Re: [sqlsmith] ERROR: badly formatted node string "RESTRICTINFO...
In-Reply-To: <18988.1492016437@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