Re: [BUG] Failed Assertion in ReorderBufferChangeMemoryUpdate()

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: "Drouvot, Bertrand" <bdrouvot(at)amazon(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [BUG] Failed Assertion in ReorderBufferChangeMemoryUpdate()
Date: 2021-09-06 11:54:59
Message-ID: CAFiTN-uoTz0bUtOoZxJcB7kPt9xMrKsDATTXoJfktJtPOfC_bw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 6, 2021 at 4:04 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:

> On Fri, Aug 13, 2021 at 3:15 PM Drouvot, Bertrand <bdrouvot(at)amazon(dot)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 after the
> 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?
>

Yeah, that seems more logical to me.

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2021-09-06 11:59:16 Re: Diagnostic comment in LogicalIncreaseXminForSlot
Previous Message Fujii Masao 2021-09-06 11:52:45 Re: Allow escape in application_name (was: [postgres_fdw] add local pid to fallback_application_name)