title: Why is an INSERT query hanging indefinitely and locking up PostgreSQL database and pgAdmin
body: <p>I have a Spring Batch application (though I THINK I've eliminated Spring as the culprit -- more below) that uses the <code>42.2.8</code> release of the <code>org.postgresql</code> driver to connect to a PostgreSQL 11.1 database, provided as an AWS RDS instance. The app is being migrated over from an Oracle setup, but whenever I try to run the application to ingest data, it locks up the process indefinitely and, to an extent, seems to lock up the database itself... </p>
  
  <p>For some reason, the code that works fine for ingesting into Oracle, when changed over to instead target postgres, seems to completely choke on INSERT statements (whether Spring generates them or whether I try to bypass all calls to Spring by putting the INSERT statement and connection info hard-coded into the top of the application main function). </p>
  
  <p>On top of that, there are certain things I can't even do in pgAdmin until I kill the hung process. The web interface also hangs indefinitely, and I'm trying to figure out a rhyme or reason for it (I can't blame the table, because other tables can get blocked and can sometimes be accessed; sometimes I can make new connections, sometimes I can't; I do seem to reliably be able to refresh tables that I've previously queried, so long as I don't kill the tab/connection)</p>
  
  <p>I'm not sure if Spring is autowiring something or injecting something auto-magically around the simple call, so I'm going to make a simple Java app to try to eliminate that possibility... I might also try a different postgres driver, but it concerns me that it seems to hang the pgAdmin web interface... but anyway I'm hoping someone has encountered and either fixed or mitigated this situation before, and it just didn't end up in an easily-Googleable article yet</p>
  
  <p>Anyone have this issue? With or without Spring Batch?</p>