-1

我遇到了以下问题。

我想使用逻辑复制和 wal2json 插件在 postgres 数据库中读取 WAL,你能帮我解决这个问题吗?

我还观察到一段时间后复制槽变得不活动。

谢谢。

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)
4

1 回答 1

-2

数据库服务器内存不足,可能正在处理大量数据。增加服务器端的内存,或者减少内存消耗(work_mem, shared_buffers, max_connections)。

于 2020-05-20T09:32:58.043 回答