From: Euler Taveira <euler@eulerto.com>
To: reynoldregan94@gmail.com
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17865: Logical decoding : JDBC - Out of memory exception (WAL2JSON Format -1) gives a wrong associated LSN
Date: Fri, 24 Mar 2023 17:14:34 -0300
Message-ID: <1df3c550-0506-48b6-8251-2af23b017ad9@app.fastmail.com> (raw)
In-Reply-To: <17865-4eab2c1b76fede4a@postgresql.org>
References: <17865-4eab2c1b76fede4a@postgresql.org>
On Thu, Mar 23, 2023, at 9:22 AM, PG Bug reporting form wrote:
> 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.
If you have a big transaction then it is a format 1 limitation. In this case,
you have 2 options:
* use write-in-chunks parameter. It is only available for format 1;
* use format 2.
Format 1 is the default but format 2 avoid issues with big 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.
>
I know nothing about JDBC, if the options above does not solve your problem, I
suggest that you ask in pgsql-jdbc mailing list. If after investigation, you
conclude that it is a wal2json limitation/bug, open a issue [1].
[1] https://github.com/eulerto/wal2json/issues
--
Euler Taveira
EDB https://www.enterprisedb.com/
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: euler@eulerto.com, reynoldregan94@gmail.com
Subject: Re: BUG #17865: Logical decoding : JDBC - Out of memory exception (WAL2JSON Format -1) gives a wrong associated LSN
In-Reply-To: <1df3c550-0506-48b6-8251-2af23b017ad9@app.fastmail.com>
References: <17865-4eab2c1b76fede4a@postgresql.org> <1df3c550-0506-48b6-8251-2af23b017ad9@app.fastmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox