Re: FailedAssertion at ReorderBufferCheckMemoryLimit()

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: FailedAssertion at ReorderBufferCheckMemoryLimit()
Date: 2020-06-09 08:58:19
Message-ID: CAA4eK1KVQ2t=ZgDNshgJZvgby_EorQDug+LnPR1=L5NZcxu4UQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 9, 2020 at 1:56 PM Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2020-06-09 09:01:13 Re: Bump default wal_level to logical
Previous Message Kyotaro Horiguchi 2020-06-09 08:53:01 Re: Bump default wal_level to logical