RE: Logical replication 'invalid memory alloc request size 1585837200' after upgrading to 17.5
Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: 'Masahiko Sawada' <sawada.mshk@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>
Cc: Duncan Sands <duncan.sands@deepbluecap.com>, "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>
Date: 2025-05-29T06:10:27Z
Lists: pgsql-bugs
Dear Sawada-san, > What if we remember all executed REORDER_BUFFER_CHANGE_INVALIDATION > in > a queue while replaying the transaction so that we can execute them at > the end in a non-error path, instead of re-traversing the entire list > of changes to execute the inval messages? I think this idea is similar with v4 patch [1]. It adds another queue which stores the inval messages when they are being distributed, and the inval queue is consumed while committing. > As for concurrent abort > paths, probably we can consider re-traversing the entire list, > unconditionally invalidating all caches (using > InvalidateSystemCaches()), or somehow traversing the list of changes > only when there might be any REORDER_BUFFER_CHANGE_INVALIDATION in > the > rest of changes? In my v4 patch, it is just OK to consume all inval messages in another queue, because all needed messages are stored before we try to process txn. Based on that, I feel v4 seems bit simpler approach. [1]: https://www.postgresql.org/message-id/OSCPR01MB149667B316377CE0615E15138F567A%40OSCPR01MB14966.jpnprd01.prod.outlook.com Best regards, Hayato Kuroda FUJITSU LIMITED
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix cache-dependent test failures in logical decoding.
- 87819f766f37 13.22 landed
-
Fix re-distributing previously distributed invalidation messages during logical decoding.
- d87d07b7ad3b 18.0 landed
- 45c357e0e85d 17.6 landed
- b2ae077205e1 16.10 landed
- fc0fb77c550f 15.14 landed
- 983b3636259b 14.19 landed
- 1230be12f086 13.22 landed
-
Fix data loss in logical replication.
- 247ee94150b6 13.21 cited
- 4909b38af034 18.0 cited