Re: [HACKERS] ExecPrepareExprList and per-query context

2017-04-10 Thread Amit Langote
On 2017/04/08 1:49, Tom Lane wrote: > Amit Langote writes: >> Should ExecPrepareExprList also switch to estate->es_query_cxt? > > Good point; I'm surprised we haven't noted any failures from that. > We surely want the entire result data structure to be in the same > memory context. There are not

Re: [HACKERS] ExecPrepareExprList and per-query context

2017-04-07 Thread Tom Lane
Amit Langote writes: > Should ExecPrepareExprList also switch to estate->es_query_cxt? Good point; I'm surprised we haven't noted any failures from that. We surely want the entire result data structure to be in the same memory context. There are not very many callers right now, and I guess they

[HACKERS] ExecPrepareExprList and per-query context

2017-04-07 Thread Amit Langote
As of b8d7f053c5c, ExecPrepareExprList is (must be?) used instead of ExecPrepareExpr when the caller wants to initialize expressions in a list, for example, FormIndexDatum. ExecPrepareExpr doesn't require the caller to have switched to per-query context, because it itself will. Same is not howeve