Re: Adding REPACK [concurrently] - Mailing list pgsql-hackers

From Mihail Nikalayeu
Subject Re: Adding REPACK [concurrently]
Date
Msg-id CADzfLwWFr9h_+cbSQvPpdxgLbVL5wwxFRx21ezNvLYgJM=FVCQ@mail.gmail.com
Whole thread
In response to Re: Adding REPACK [concurrently]  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: Adding REPACK [concurrently]
List pgsql-hackers
Hi!

On Mon, Apr 6, 2026 at 12:48 PM Alvaro Herrera <alvherre@alvh.no-ip.org> 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.



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: client_connection_check_interval default value
Next
From: Antonin Houska
Date:
Subject: Re: Adding REPACK [concurrently]