Is the same DB version (and which exact versions) being used in both tests? I strongly suspect no...
Can you turn on full statement logging and see if anything unusual shows up?
What's in your WHERE clause on the delete - and did you use Statement or PreparedStatement?
Having a self-contained test case makes the previous two items less problematic. Also, that general test case can be translated to psql which would help to isolate the problem to either the driver or the database.