Re: Adding REPACK [concurrently]

From: Mihail Nikalayeu <mihailnikalayeu(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Antonin Houska <ah(at)cybertec(dot)at>, Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Robert Treat <rob(at)xzilla(dot)net>
Subject: Re: Adding REPACK [concurrently]
Date: 2026-04-06 11:21:32
Message-ID: CADzfLwWFr9h_+cbSQvPpdxgLbVL5wwxFRx21ezNvLYgJM=FVCQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonin Houska 2026-04-06 11:23:57 Re: Adding REPACK [concurrently]
Previous Message Fujii Masao 2026-04-06 11:09:30 Re: client_connection_check_interval default value