BUG #17865: Logical decoding : JDBC - Out of memory exception (WAL2JSON Format -1) gives a wrong associated LSN - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #17865: Logical decoding : JDBC - Out of memory exception (WAL2JSON Format -1) gives a wrong associated LSN
Date
Msg-id 17865-4eab2c1b76fede4a@postgresql.org
Whole thread Raw
Responses Re: BUG #17865: Logical decoding : JDBC - Out of memory exception (WAL2JSON Format -1) gives a wrong associated LSN
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17865
Logged by:          Reynold Regan Edward
Email address:      reynoldregan94@gmail.com
PostgreSQL version: 13.9
Operating system:   Linux
Description:

This issue happens while reading from the logical replication slot (WAL2JSON
plugin). 
When there are multiple sessions writing to Postgres tables and there is a
Postgres StringBuffer limit exceeded exception (processing transactions
greater than 1GB size), the associated LSN reported in the SQLException
object is incorrect.

Steps to reproduce
1. Create a logical replication slot with Wal2Json.
2. Start the client Java Replication API Read.
3.
Session 1:  start one small transaction & commit 
Session 2 : start one large transaction - 5million insert
Session 3 : start 2nd large transaction - 5 million insert
Session 4: When when session 2 and 3 are running , keep doing small
transactions. 

Now, the Java logical decoding API reading from the slot will fail with Out
of memory error while processing the session 2's transaction. Exception
object received contains irrelevant LSN marked as associated LSN.
Note: Incase of single session writing to the database the Associated LSN is
clearly of the failing transaction.


pgsql-bugs by date:

Previous
From: Andrey Lizenko
Date:
Subject: Re: BUG #17863: Unable to restore dump 12.12 -> 15.2
Next
From: Devrim Gündüz
Date:
Subject: Re: BUG #17856: Missing geos310-3.10.3 library