| From: | "David Kremer" <jkorders(at)gmx(dot)com> | 
|---|---|
| To: | pgsql-general(at)postgresql(dot)org | 
| Subject: | Does creating readOnly connections, when possible, free up resources in Postgres? | 
| Date: | 2019-01-27 18:11:09 | 
| Message-ID: | trinity-98ed82ed-5c4a-46ae-8f15-fcb75b13b3d7-1548612669012@3c-app-mailcom-bs03 | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
(resending to remove HTML formatting)
I have an API server and I'm trying to be conscientious managing Postgres's resources carefully. On the client side, I have a Hikari Pool.
Usually when I need a connection, I simply create a default read/write connection, even if I don't plan to make any updates or inserts or hold any locks. But most of my database connections are in fact read-only.
I saw that when you create a JDBC connection, you can specify readOnly=true. Would doing so somehow help Postgres manage its other connections? Perhaps Postgres, knowing that a connection is readOnly and will never even attempt to do an update, will free up some internal resources for other connections. Is this accurate?
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2019-01-27 19:31:41 | Re: Does creating readOnly connections, when possible, free up resources in Postgres? | 
| Previous Message | David Kremer | 2019-01-27 18:09:29 | Does creating readOnly connections, when possible, free up resources in Postgres? |