Re: [BUG] Failed Assertion in ReorderBufferChangeMemoryUpdate() - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: [BUG] Failed Assertion in ReorderBufferChangeMemoryUpdate()
Date
Msg-id CAA4eK1LfzPdTO73vW2qUkJeB1k1iL04rmqVJseBbF5qRAonmiw@mail.gmail.com
Whole thread Raw
In response to [BUG] Failed Assertion in ReorderBufferChangeMemoryUpdate()  ("Drouvot, Bertrand" <bdrouvot@amazon.com>)
Responses Re: [BUG] Failed Assertion in ReorderBufferChangeMemoryUpdate()
Re: [BUG] Failed Assertion in ReorderBufferChangeMemoryUpdate()
List pgsql-hackers
On Fri, Aug 13, 2021 at 3:15 PM Drouvot, Bertrand <bdrouvot@amazon.com> wrote:
>
>
> Please find attached a patch proposal to avoid the failed assertion (by ensuring that
ReorderBufferChangeMemoryUpdate()being triggered with "addition" set to false in ReorderBufferToastReplace() is done
afterthe elog(ERROR,)).
 
>

The error can occur at multiple places (like via palloc or various
other places) between the first time we subtract the change_size and
add it back after the change is re-computed. I think the correct fix
would be that in the beginning we just compute the change_size by
ReorderBufferChangeSize and then after re-computing the change, we
just subtract the old change_size and add the new change_size. What do
you think?

-- 
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: Patch: shouldn't timezone(text, timestamp[tz]) be STABLE?
Next
From: gkokolatos@pm.me
Date:
Subject: Re: psql: \dl+ to list large objects privileges