Re: [HACKERS] Re: BUG #14657: Server process segmentation fault in v10, May 10th dev snapshot

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Cc: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>, Dilip Kumar <dilipbalaut@gmail.com>, sveinn.sveinsson@gmail.com, Postgres-Bugs <pgsql-bugs@postgresql.org>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2017-05-19T19:28:22Z
Lists: pgsql-bugs, pgsql-hackers
On Fri, May 19, 2017 at 6:07 AM, Ashutosh Bapat
<ashutosh.bapat@enterprisedb.com> wrote:
> We still have the same copy shared across multiple append paths and
> set_plan_refs would change change it underneath those. May not be a
> problem right now but may be a problem in the future.

I agree.  I think it's better for the path-creation functions to copy
the list, so that there is no surprising sharing of substructure.
set_plan_refs() obviously expects this data to be unshared, and this
seems like the best way to ensure that's true in all cases.

Committed that way.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Commits

  1. Copy partitioned_rels lists to avoid shared substructure.