Re: BUG #17865: Logical decoding : JDBC - Out of memory exception (WAL2JSON Format -1) gives a wrong associated LSN
От | Euler Taveira |
---|---|
Тема | Re: BUG #17865: Logical decoding : JDBC - Out of memory exception (WAL2JSON Format -1) gives a wrong associated LSN |
Дата | |
Msg-id | 1df3c550-0506-48b6-8251-2af23b017ad9@app.fastmail.com обсуждение исходный текст |
Ответ на | BUG #17865: Logical decoding : JDBC - Out of memory exception (WAL2JSON Format -1) gives a wrong associated LSN (PG Bug reporting form <noreply@postgresql.org>) |
Список | pgsql-bugs |
On Thu, Mar 23, 2023, at 9:22 AM, PG Bug reporting form wrote:
This issue happens while reading from the logical replication slot (WAL2JSONplugin).When there are multiple sessions writing to Postgres tables and there is aPostgres StringBuffer limit exceeded exception (processing transactionsgreater than 1GB size), the associated LSN reported in the SQLExceptionobject 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 Outof memory error while processing the session 2's transaction. Exceptionobject received contains irrelevant LSN marked as associated LSN.Note: Incase of single session writing to the database the Associated LSN isclearly 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].
В списке pgsql-bugs по дате отправления: