Re: FailedAssertion at ReorderBufferCheckMemoryLimit() - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: FailedAssertion at ReorderBufferCheckMemoryLimit()
Date
Msg-id CAA4eK1KVQ2t=ZgDNshgJZvgby_EorQDug+LnPR1=L5NZcxu4UQ@mail.gmail.com
Whole thread Raw
In response to FailedAssertion at ReorderBufferCheckMemoryLimit()  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Responses Re: FailedAssertion at ReorderBufferCheckMemoryLimit()  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Tue, Jun 9, 2020 at 1:56 PM Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>
> Hi,
>
> I encountered the following assertion failure when I changed
> logical_decoding_work_mem to lower value while logical replication
> is running. This happend in the master branch.
>
> TRAP: FailedAssertion("rb->size < logical_decoding_work_mem * 1024L", File: "reorderbuffer.c", Line: 2403)
..
>
>
> ReorderBufferCheckMemoryLimit() explains that it relies on
> the following (commented) assumption. But this seems incorrect
> when logical_decoding_work_mem is decreased.
>

Yeah, that could be a problem.

> I wonder if we may
> need to keep evicting the transactions until we don't exceed
> memory limit.
>

Yes, that should be the right fix here.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: Bump default wal_level to logical
Next
From: Magnus Hagander
Date:
Subject: Re: Bump default wal_level to logical