You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
I created a logical replication slot corresponding to a database table. When I simulate a large amount of data, such as 300,000 records, using PGReplicationStream to consume and output the data, it always throws an error after running for a while, showing "PGStream is closed" and then the program stops running. I captured the packets and found that the client always initiates a connection close, which is strange. Why does the client close the connection?
I presume you mean you are using 42.3.3
First thing I'd do is upgrade to the most recent version
As for why it is closing. I have no clue. It should not be
I used a SQL statement to create a large amount of data in a transaction: "insert into t_test SELECT generate_series(1,500000) as key,repeat( chr(int4(random()*26)+65),4);". If I only insert one row at a time, there is no problem. However, if I add the following statement before the line "ByteBuffer msg = stream.readPending();", the error occurs less frequently: "if(replConnection == null) { System.out.println("current connection is null"); }".
Please read https://stackoverflow.com/help/minimal-reproducible-example
Describe the issue
I created a logical replication slot corresponding to a database table. When I simulate a large amount of data, such as 300,000 records, using PGReplicationStream to consume and output the data, it always throws an error after running for a while, showing "PGStream is closed" and then the program stops running. I captured the packets and found that the client always initiates a connection close, which is strange. Why does the client close the connection?
Here is an example code:
Driver Version?
43.3.3
Java Version?
1.8
OS Version?
centos7 and windows 10 all the same issue
PostgreSQL Version?
11.19
The text was updated successfully, but these errors were encountered: