I'm using Hibernate to perform SELECT, INSERT queries over a postgresql database server 9.2.7 version. I'm seeing ROLLBACK, S_2 queries being run after SELECT for which the client is consuming 20-30ms to send the ACK. I understand this is the extended query protocol feature of the v3 JDBC driver. And for the INSERT query there's a COMMIT being called for which the server responds immediately but again the client takes another 20-30ms to send the ACK.
I think the problem can be solved by switching to protocolVersion to 2 (It was mentioned as a solution in one of the threads but anyways didn't work for me). But I guess this should be the last resort.
So the question is, is there a way to make my client not wait to send the ACK and make it asynchronous so that my round-trip time will be less. Basically I want to know if I'm making a blocking call in my hibernate client.
Surprisingly by running the same client on a 9.2.4 postgresql server these calls seem to be asynchronous and I'm getting much better RTT. Does it mean that the server can control whether client can be asynchronous or not?