I am running into the following problem.
I want read WAL in postgres database using logical replication and wal2json plugin, Could you please help me how to resolve this issue?
Also I observed that the replication slots after some time became inactive.
Thanks.
ByteBuffer buffer = PGReplicationStream.read() gives following error.
org.postgresql.util.PSQLException: ERROR: out of memory
Detail: Cannot enlarge string buffer containing 1073741779 bytes by 596 more bytes.
Where: slot "tempslot", output plugin "wal2json", in the change callback, associated LSN 1/5781D4B0
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2468)
at org.postgresql.core.v3.QueryExecutorImpl.processCopyResults(QueryExecutorImpl.java:1144)
at org.postgresql.core.v3.QueryExecutorImpl.readFromCopy(QueryExecutorImpl.java:1063)
at org.postgresql.core.v3.CopyDualImpl.readFromCopy(CopyDualImpl.java:37)
at org.postgresql.core.v3.replication.V3PGReplicationStream.receiveNextData(V3PGReplicationStream.java:155)
at org.postgresql.core.v3.replication.V3PGReplicationStream.readInternal(V3PGReplicationStream.java:124)
at org.postgresql.core.v3.replication.V3PGReplicationStream.read(V3PGReplicationStream.java:70)