Re: Logical replication 'invalid memory alloc request size 1585837200' after upgrading to 17.5

Duncan Sands <duncan.sands@deepbluecap.com>

From: Duncan Sands <duncan.sands@deepbluecap.com>
To: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, 'Amit Kapila' <amit.kapila16@gmail.com>
Cc: "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>, Sawada Masahiko <sawada.mshk@gmail.com>
Date: 2025-05-21T13:27:31Z
Lists: pgsql-bugs
> Based on the analysis, I created a PoC which avoids the repalloc().
> Invalidation messages distributed by SnapBuildDistributeSnapshotAndInval() are
> skipped to add in the list, just queued - repalloc can be skipped. Also, the function
> distributes messages only in the list, so received messages won't be sent again.
> 
> Now a patch for PG17 is created for testing purpose. Duncan, can you apply this and
> confirms whether the issue can be solved?

Thanks Hayato Kuroda, will do, however it may take a few days.

Best wishes, Duncan.



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix cache-dependent test failures in logical decoding.

  2. Fix re-distributing previously distributed invalidation messages during logical decoding.

  3. Fix data loss in logical replication.