public inbox for [email protected]
help / color / mirror / Atom feedFrom: Max Madden <[email protected]>
To: Hayato Kuroda (Fujitsu) <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Logical Replication Memory Allocation Error - "invalid memory alloc request size"
Date: Wed, 11 Jun 2025 11:57:51 +0100
Message-ID: <CAD1FGCQmgLK9XqHfmkAR2+79oLBsJRYPQj0W-hirbZJRgzLVkg@mail.gmail.com> (raw)
In-Reply-To: <OSCPR01MB149660B4FB4ED7B34D4340C6AF575A@OSCPR01MB14966.jpnprd01.prod.outlook.com>
References: <CAD1FGCT2sYrP_70RTuo56QTizyc+J3wJdtn2gtO3VttQFpdMZg@mail.gmail.com>
<OSCPR01MB149660B4FB4ED7B34D4340C6AF575A@OSCPR01MB14966.jpnprd01.prod.outlook.com>
Hi Hayato,
Thank you for your reply.
We have rewritten as many of our transactions as possible to avoid using
temporary tables, and so far, that seems to have resolved the problem.
Thank you for your help.
Many thanks,
Max
On Wed, Jun 11, 2025 at 3:31 AM Hayato Kuroda (Fujitsu) <
[email protected]> wrote:
> Dear Max,
>
> Thanks for the report.
>
> > The initial snapshot and data copy complete successfully for all tables.
> However, anywhere from 5
> > minutes to 2 hours after the initial sync, the subscription consistently
> fails with memory allocation errors like:
> >
> > ```
> > 2025-06-10 14:14:56.800 UTC [299] ERROR: could not receive data from WAL
> stream: ERROR: invalid memory alloc request size 1238451248
> > 2025-06-10 14:14:56.805 UTC [1] LOG: background worker "logical
> replication worker" (PID 299) exited with exit code 1
> > ```
>
> I think this is a known postgres bug which has been also reported at [1].
> We are discussing
> how we fix. Typically this can happen when there are lots of concurrent
> transactions
> and they have DDLs. IIUC there are no good workaround for now - any
> parameters can't
> avoid the failure. Only you can reduce them.
>
> I'm happy if you apply the patch posted at [1] and confirms the issue can
> be solved, but...
> seems difficult because you are in the managed env.
>
> [1]:
> https://www.postgresql.org/message-id/CALDaNm0TaTPuza7Fa%2BDRMzL%2BmqK3%2B7RVEvFiRoDJbU2vkJESwg%40ma...
>
> Best regards,
> Hayato Kuroda
> FUJITSU LIMITED
>
>
view thread (5+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Logical Replication Memory Allocation Error - "invalid memory alloc request size"
In-Reply-To: <CAD1FGCQmgLK9XqHfmkAR2+79oLBsJRYPQj0W-hirbZJRgzLVkg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox