I have a JDBC connection pool in a web API that makes frequent requests to the RDS Instance. Each request is for a long running SQL query where PG decides not to use indices because the amount of data to be returned is quite large.
I'm noticing that some of these long running queries are just stuck in state
idle in transaction. When look up the
pid for these processes in
pg_locks table they have 152 rows . With mode
The intent for this table is to be never updated — It serves as a point in time table. So I don't see a need for
idle transaction or
accesssharelock. Is there I can turn these off so that my queries run faster and aren't stuck because of