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

Masahiko Sawada <sawada.mshk@gmail.com>

From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>, "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>, Duncan Sands <duncan.sands@deepbluecap.com>, Alexander Lakhin <exclusion@gmail.com>
Date: 2025-06-23T07:14:45Z
Lists: pgsql-bugs
On Mon, Jun 23, 2025 at 11:52 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Sun, Jun 22, 2025 at 8:28 AM vignesh C <vignesh21@gmail.com> wrote:
> >
> > On Fri, 20 Jun 2025 at 13:51, Hayato Kuroda (Fujitsu)
> > <kuroda.hayato@fujitsu.com> wrote:
> > >
> >
> > > To fix the test failure, I suggest to just remove the case. Insert-after-commit
> > > case has already been tested by above part of this file, so no need to do others.
> >
> > Alternatively I was thinking of a fix if it is possible to run this
> > test conditionally when CLOBBER_CACHE_ALWAYS is not defined, I was not
> > sure if it is easy to do that and worth the effort for the PG13
> > branch. I'm ok with the proposed change.
> >
>
> I prefer to change the test because, if the above analysis is correct,
> it indicates that the test has a cache flush hazard. It would be
> better to make the test robust instead of working around it.

The analysis shared by Kuroda-san matches my understanding. I'd like
to avoid removing this test case just because it doesn't pass with
CLOBBER_CACHE_ALWAYS.

One solution is to have two expected-output files to cover both cases.
We do a similar thing for the plpgsql_cache.sql test case. What do you
think?

Regards,

-- 
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com



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.