Re: "type with xxxx does not exist" when doing ExecMemoize()

From: Andrei Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>
To: Tender Wang <tndrwang(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Richard Guo <guofenglinux(at)gmail(dot)com>
Subject: Re: "type with xxxx does not exist" when doing ExecMemoize()
Date: 2024-02-26 07:54:21
Message-ID: 7a6a807c-193f-4333-937b-8211b1330579@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On 26/2/2024 12:44, Tender Wang wrote:
>
>
> Andrei Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru
> <mailto:a(dot)lepikhov(at)postgrespro(dot)ru>> 于2024年2月26日周一 10:57写道:
>
> On 25/2/2024 20:32, Tender Wang wrote:
> > I think in prepare_probe_slot(), should called datumCopy as the
> attached
> > patch does.
> >
> > Any thoughts? Thanks.
> Thanks for the report.
> I think it is better to invent a Runtime Memory Context; likewise,
> it is
> already designed in IndexScan and derivatives. Here, you just allocate
> the value in some upper memory context.
> Also, I'm curious why such a trivial error hasn't been found for a
> long time
>
>
> Make sense. I found MemoizeState already has a MemoryContext, so I used it.
> I update the patch.
This approach is better for me. In the next version of this patch, I
included a test case. I am still unsure about the context chosen and the
stability of the test case. Richard, you recently fixed some Memoize
issues, could you look at this problem and patch?

--
regards,
Andrei Lepikhov
Postgres Professional

Attachment Content-Type Size
v3-0001-Store-Memoize-probeslot-values-in-the-hash-table-mem.patch text/plain 4.6 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tender Wang 2024-02-26 08:14:39 Re: "type with xxxx does not exist" when doing ExecMemoize()
Previous Message Alexander Lakhin 2024-02-26 06:00:01 Re: BUG #18363: Assert !ReindexIsProcessingIndex falsified with expression index over select from table

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2024-02-26 07:55:04 Re: RFC: Logging plan of the running query
Previous Message Bertrand Drouvot 2024-02-26 07:48:38 Re: Synchronizing slots from primary to standby