Message-ID: From: "vlsi (@vlsi)" To: "pgjdbc/pgjdbc" Date: Wed, 01 Jun 2022 14:29:41 +0000 Subject: Re: [pgjdbc/pgjdbc] PR #2525: fix: support queries with up to 65535 (inclusive) parameters In-Reply-To: References: List-Id: X-GitHub-Author-Login: vlsi X-GitHub-Comment-Id: 1143686144 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 2525 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/2525#issuecomment-1143686144 Content-Type: text/plain; charset=utf-8 Finally, I nailed it: https://github.com/pgjdbc/pgjdbc/commit/82dbbe46002d43298ed4ff1df26623f9cb51effd#diff-dd8064c49349abfe7ba0b6e2d65ebb7d89600239c982dd0556bdace3765f751cL24-L25 `SendRecvBufferSizeTest` had `System.setProperty("sendBufferSize", "1024"); System.setProperty("receiveBufferSize", "1024");` That caused all the test after `SendRecvBufferSizeTest` to use the small buffer size, which caused slow processing of large requests/responses. Just in case you wonder, the trace log does show buffer sizes: ``` 2022-05-31 20:10:33 FINE org.postgresql.Driver connect Connecting with URL: jdbc:postgresql://localhost:5432/test?ApplicationName=Driver Tests&loggerLevel=OFF&loggerFile=target/pgjdbc-tests.log 2022-05-31 20:10:33 FINE org.postgresql.jdbc.PgConnection PostgreSQL JDBC Driver 42.3.7-SNAPSHOT 2022-05-31 20:10:33 FINE org.postgresql.jdbc.PgConnection setDefaultFetchSize setDefaultFetchSize = 0 2022-05-31 20:10:33 FINE org.postgresql.jdbc.PgConnection setPrepareThreshold setPrepareThreshold = 5 2022-05-31 20:10:33 FINE org.postgresql.core.v3.ConnectionFactoryImpl openConnectionImpl Trying to establish a protocol version 3 connection to localhost:5432 2022-05-31 20:10:33 FINE org.postgresql.core.v3.ConnectionFactoryImpl tryConnect Receive Buffer Size is 1,152 2022-05-31 20:10:33 FINE org.postgresql.core.v3.ConnectionFactoryImpl tryConnect Send Buffer Size is 2,304 2022-05-31 20:10:33 FINEST org.postgresql.core.v3.ConnectionFactoryImpl enableSSL FE=> SSLRequest 2022-05-31 20:10:33 FINEST org.postgresql.core.v3.ConnectionFactoryImpl enableSSL <=BE SSLOk 2022-05-31 20:10:33 FINE org.postgresql.ssl.MakeSSL convert converting regular socket connection to SSL ```