Re: BUG #17798: Incorrect memory access occurs when using BEFORE ROW UPDATE trigger - Mailing list pgsql-bugs

From Robert Haas
Subject Re: BUG #17798: Incorrect memory access occurs when using BEFORE ROW UPDATE trigger
Date
Msg-id CA+Tgmoa+1HXZAOYiHL5_=+akjyRSDLcHBx-FvmfuwsvFXCkAKg@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17798: Incorrect memory access occurs when using BEFORE ROW UPDATE trigger  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #17798: Incorrect memory access occurs when using BEFORE ROW UPDATE trigger
List pgsql-bugs
On Fri, Jan 12, 2024 at 12:28 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> After sleeping on it, I'm inclined to the opinion that unconditionally
> materializing newslot here is a good idea.

I'm glad you came to that conclusion, and I agree. I think it's really
bad that we're passing around un-materialized slots across many layers
of the call stack; having the behavior of the inner code know in
detail which outer code paths materialize the slot and which don't
seems like a recipe for infinite future bugs. The only concern is
overhead, IMV.

> 75e03eabe
> should be sufficient evidence that there's a lot of hazard here
> (and I especially like being able to revert that wart).

I haven't analyzed whether this allow reverting that, but it seems
nice if it does.

Do you want to take this forward from here?

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #18289: postgresql14-devel-14.10-2PGDG.rhel8.x86_64.rpm Contains invalid cLang option in Makefile.global
Next
From: Tom Lane
Date:
Subject: Re: BUG #17798: Incorrect memory access occurs when using BEFORE ROW UPDATE trigger