" java.io.IOException: Unexpected packet type: 25" char 25 is EM. ( End of Medium) I do not see it being part of the wire protocol, as for the same reason, not in pgjdbc handling i think.
PostgreSQL: Documentation: 13: 52.7. Message Formats <https://www.postgresql.org/docs/current/protocol-message-formats.html> pgjdbc/QueryExecutorImpl.java at REL42.2.10 · pgjdbc/pgjdbc (github.com) <https://github.com/pgjdbc/pgjdbc/blob/REL42.2.10/pgjdbc/src/main/java/org/postgresql/core/v3/QueryExecutorImpl.java#L2395> I may be diverting that may not be related but a few things, just in case. 1) we once had a scenario of a bad nic driver e1000, that resulted in a lot of pkt losses. We figured out there were too many pkt drops and upgraded the driver to vmnet or something. 2)You should also raise the same with pgjdbc. I see they have resolved issues with other mismatched packet types like 52 at their end. 3) I have had some arguments wrt pgjdbc/npgsql having issues with pgbouncer and not with postgresql directly. I counter by running the same queries using psql with pgbouncer. never got an error. But I am not an expert with Java so I keep an open mind and also raise this with the driver owners just in case as well as pgbouncer. else it is a deadlock :) Unexpected packet type during stream replication · Issue #1466 · pgjdbc/pgjdbc (github.com) <https://github.com/pgjdbc/pgjdbc/issues/1466> although this one is different issue, can you reproduce this case like above ?