pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Alexander Lakhin <exclusion@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org, Richard Guo <guofenglinux@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Peter Geoghegan <pg@bowt.ie>
Subject: Re: BUG #17798: Incorrect memory access occurs when using BEFORE ROW UPDATE trigger
Date: Thu, 11 Jan 2024 16:43:16 -0500
Message-ID: <325298.1705009396@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmobRr7iWYNNj+-djD6AkoS5trpL8JznXbfO74+dtmCsOsg@mail.gmail.com>
References: <17798-0907404928dcf0dd@postgresql.org>
	<87fe6c28-80b2-f709-a8db-d105e5240e39@gmail.com>
	<CAMbWs4_pg7ab=OJF2CGLzs=noWEjujerxfo92sm3RL9ce=ogsQ@mail.gmail.com>
	<CAMbWs48FHhuuuWbxygO4Wey7ahdaSwRjzJODKXx7=GFsge_aLg@mail.gmail.com>
	<f5ff446f-72e2-44f7-80c6-4256cf7caeb3@gmail.com>
	<a4a8cf37-e9d5-3c58-fc2e-d217cf66f315@gmail.com>
	<1849610.1682807087@sss.pgh.pa.us>
	<e989408c-1838-61cd-c968-1fcf47c6fbba@gmail.com>
	<CA+TgmoZz1fGaTnOSf1yQhwYovEEkJZ9iioQXnLgaJz+1fBip=g@mail.gmail.com>
	<494cd7c4-c109-6886-c0e3-138a95e7e38b@gmail.com>
	<CA+TgmoYAsQWMqMUNNdyp8V0KVxMoz=0y+3XNCf3ST-o1yyz5Jg@mail.gmail.com>
	<74335d44-819d-60e0-859a-efe74d9c84c2@gmail.com>
	<CA+TgmoYkOp=jDg15ugJDwxqoA6drAPBZmOJkhZJ11HZWhEYx6w@mail.gmail.com>
	<b64c183f-4ae1-0b16-afcf-11101ebc4213@gmail.com>
	<CA+TgmobRr7iWYNNj+-djD6AkoS5trpL8JznXbfO74+dtmCsOsg@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Jan 10, 2024 at 10:00 PM Alexander Lakhin <exclusion@gmail.com> wrote:
>> I was discouraged by that vast distance and implicit buffer usage too, but
>> I found no other feasible way to fix it. On the other hand, 75e03eabe and
>> Andres's words upthread made me believe that it's an acceptable solution.

> I agree that it's potentially acceptable. I just wonder if Tom or
> someone else is going to want to propose a bigger change to avoid some
> of this messiness. I don't know what that would look like, though.

I'm still feeling itchy about it.  Maybe the problem could be fixed
better if we didn't re-use slots with such abandon in this code,
but I don't have a concrete proposal.  Also, that'd likely be a
nontrivial rewrite bringing its own possibilities of adding bugs.

Some concrete thoughts:

* Maybe better to Assert(newslot == epqslot_clean) instead of
what you did here?  Not sure.

* Why is the ExecMaterializeSlot step needed if we don't have
an epqslot_candidate?

			regards, tom lane





view thread (37+ messages)  latest in thread

Message-ID: <325298.1705009396@sss.pgh.pa.us>
Permalink:  ../325298.1705009396@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/325298.1705009396@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, exclusion@gmail.com, guofenglinux@gmail.com, andres@anarazel.de, pg@bowt.ie
  Subject: Re: BUG #17798: Incorrect memory access occurs when using BEFORE ROW UPDATE trigger
  In-Reply-To: <325298.1705009396@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox