This question has been asked enough times now that I created an FAQ
http://wiki.jboss.org/wiki/Wiki.jsp?page=ItHangsTalkingToTheDatabaseOrItReportsADeadlock
The solution is talk to your database admin.
and also to use search so we don't have to continually repost these answers,
where we even
If you can reproduce your hanging issue, then get a stack trace and determine
the issue. Obviously if it's stuck in some JDBC call, it's a problem with the
driver.
It's highly likely your problem is with Postgres, but it would be nice to have
a correct example configuration for persistence