Re: setting estate in ExecInitNode() itself - Mailing list pgsql-hackers

From Tom Lane
Subject Re: setting estate in ExecInitNode() itself
Date
Msg-id 15689.1515166579@sss.pgh.pa.us
Whole thread Raw
In response to setting estate in ExecInitNode() itself  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Responses Re: setting estate in ExecInitNode() itself
List pgsql-hackers
Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> writes:
> Looking at ExecInitXYZ() functions, we can observe that every such
> function has a statement like
> XYZstate->ps.state = estate;
> where it saves estate in the PlanState.

Yeah ...

> I am wondering why don't we instead save estate in ExecInitNode() itself like
> result->estate = estate;

That would only work if there were no situation where the field needed to
be already valid during the node init function.  I think that's probably
wrong already (check ExecInitExpr for instance) and it certainly might
be wrong in future.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Failed to delete old ReorderBuffer spilled files
Next
From: Marco Nenciarini
Date:
Subject: Re: [PATCH] Logical decoding of TRUNCATE