import java.sql.*; public class BatchDeadLock { public static void main(String args[]) throws Exception { Class.forName("org.postgresql.Driver"); Connection conn = DriverManager.getConnection("jdbc:postgresql://localhost:5830/jurka?loglevel=2", "jurka", ""); StringBuffer create = new StringBuffer("CREATE TEMP TABLE largetable ("); StringBuffer insert = new StringBuffer("INSERT INTO largetable VALUES ("); int numParams = 500; int batchSize = 250; for (int i=0; i