Hi! On Mon, Apr 6, 2026 at 12:48 PM Alvaro Herrera <[email protected]> wrote: > Hmm, how about something like this? > > natt_ext--; > if (natt_ext < 0) > ereport(ERROR, > errcode(ERRCODE_DATA_CORRUPTED), > errmsg("insufficient number of attributes stored > separately")); I think it is ok.
> Yeah but I don't want the virtual tuple to be materialized (which would > happen in tts_virtual_materialize if I set shouldFree=true). The memory > should be freed in > ResetPerTupleExprContext(chgcxt->cc_estate); > anyway, right? Maybe deserves a comment. Not sure, ResetPerTupleExprContext resets just "ExecutorState". But slots are created in another memory context. Also, we can't reset slot->tts_mcxt itself - it will free the slot also.
