Hello Richard,
19.04.2023 11:29, Richard Guo wrote:
I have a second look at this issue and now I think the fix in v1 patch
is correct. I think the comment needs to be updated for this change,
maybe something like
* (Typically, newslot was also generated by ExecGetUpdateNewTuple, so
* that epqslot_clean will be that same slot and the copy step below
- * is not needed.)
+ * is not needed. And we need to materialize newslot in this case,
+ * since its tuple might be dependent on oldslot's storage, which
+ * might not be a local copy and be freed before we fetch newslot's
+ * tuple.)
Thanks for looking into this!
I've updated the comment based on your suggestion. Please look at the patch
attached.
I hesitate to add the isolation test to the patch as adding a dedicated
test just for this case seems too wasteful to me. Maybe that scenario could
be added to one of the existing trigger-related tests, but I couldn't find a
test, which is generic enough for that.
Best regards,
Alexander